e.printStackTrace(); fail(e.getMessage());
fail("unexepected exception", e);
	public void testMigration() {		File testDir = new File(base, "testMigrationManager");		File managerDir = new File(testDir, ".manager");		String fileName = "testMigration.txt";		File file2 = new File(testDir, fileName+".2");		File file5 = new File(testDir, fileName+".5");		File fileTable = new File(managerDir, ".fileTable");		File fileTable1 = new File(managerDir, ".fileTable.1");		File fileTable2 = new File(managerDir, ".fileTable.2");		File fileTable3 = new File(managerDir, ".fileTable.3");		String contents1 = "test reliable file contents #1";		String contents2 = "test reliable file contents #2";		String contents3 = "test reliable file contents #3";		try {			// create a .fileTable and a normal file			managerDir.mkdirs();			writeToFile(fileTable, "#safe table\n"+fileName+"=2\n");			writeToFile(file2, contents1);			manager1 = new FileManager(testDir, null);			manager1.open(true);			File test = manager1.lookup(fileName, false);			assertNotNull(test);			assertTrue(test.exists());						// update a new file			File testFile = manager1.createTempFile(fileName);			writeToFile(testFile, contents2);			manager1.update(new String[] {fileName}, new String[] {testFile.getName()});			// again			testFile = manager1.createTempFile(fileName);			writeToFile(testFile, contents3);			manager1.update(new String[] {fileName}, new String[] {testFile.getName()});			// again			testFile = manager1.createTempFile(fileName);			writeToFile(testFile, contents1);			manager1.update(new String[] {fileName}, new String[] {testFile.getName()});			manager1.close();			manager1= null;						String[] files = managerDir.list();			assertEquals(4, files.length);			//original file never gets deleted			assertTrue(fileTable.exists());			//behaves like a reliableFile?			assertFalse(fileTable1.exists());			assertTrue(fileTable2.exists());			assertTrue(fileTable3.exists());			//files are as expected?			files = testDir.list();			assertEquals(2, files.length);			assertTrue(file5.exists());						manager2 = new FileManager(testDir, null);			manager2.open(true);			testFile = manager2.lookup(fileName, false);			assertNotNull(testFile);			assertTrue(testFile.exists());			assertTrue(testFile.getName().endsWith(".5"));			manager2.close();			manager2=null;					} catch(IOException e) {			e.printStackTrace();			fail(e.getMessage());		}	}