Remove a bit of repetition and casting in PackFileTest

PackFileTest lives in o.e.j.internal.storage.file, so I think it's OK for
it to acknowledge the existence of FileRepository in order to avoid some
unnecessary casting, and probably nicer to avoid the repetition too.

Change-Id: I0de592a32f6178e6d6bf114848101e185b3111a1
Signed-off-by: Roberto Tyley <roberto.tyley@gmail.com>
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackFileTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackFileTest.java
index a19fcd9..3324627 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackFileTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackFileTest.java
@@ -95,7 +95,7 @@ public class PackFileTest extends LocalDiskRepositoryTestCase {
 
 	private TestRng rng;
 
-	private Repository repo;
+	private FileRepository repo;
 
 	private TestRepository<Repository> tr;
 
@@ -274,12 +274,9 @@ public void testDelta_FailsOver2GiB() throws Exception {
 		deflate(pack, delta);
 		byte[] footer = digest(pack);
 
-		File packName = new File(new File(
-				((FileObjectDatabase) repo.getObjectDatabase()).getDirectory(),
-				"pack"), idA.name() + ".pack");
-		File idxName = new File(new File(
-				((FileObjectDatabase) repo.getObjectDatabase()).getDirectory(),
-				"pack"), idA.name() + ".idx");
+		File dir = new File(repo.getObjectDatabase().getDirectory(), "pack");
+		File packName = new File(dir, idA.name() + ".pack");
+		File idxName = new File(dir, idA.name() + ".idx");
 
 		FileOutputStream f = new FileOutputStream(packName);
 		try {