void (File file, String relativePath) { try { Assert.assertEquals("in " + relativePath, myName, file.getName()); if (myArchive) { final File dirForExtracted = FileUtil.createTempDirectory("extracted_archive", null, false); ZipUtil.extract(file, dirForExtracted, null); assertDirectoryEqual(dirForExtracted, relativePath); FileUtil.delete(dirForExtracted); } else if (myDirectory) { Assert.assertTrue(relativePath + file.getName() + " is not a directory", file.isDirectory()); assertDirectoryEqual(file, relativePath); } else if (myContent != null) { final String content = FileUtil.loadFile(file); Assert.assertEquals("content mismatch for " + relativePath, myContent, content); } } catch (IOException e) { throw new RuntimeException(e); } }