ArcHarvestFileDTO { public boolean checkIsCompressed() throws IOException { ArchiveReader reader = ArchiveReaderFactory.get(new File(baseDir, this.getName())); boolean result = reader.isCompressed(); reader.close(); return result; }  boolean isCompressed(); void setCompressed(boolean compressed); Long getOid(); void setOid(Long oid); String getName(); void setName(String name); ArcHarvestResultDTO getHarvestResult(); void setHarvestResult(ArcHarvestResultDTO harvestResult); void setBaseDir(String baseDir); Map<String, HarvestResourceDTO> index(); boolean checkIsCompressed(); Map<String, HarvestResourceDTO> index(File baseDir); static final int MAX_URL_LENGTH; }
@Test public final void testCheckIsCompressed() { try { testInstance.setName(TestCARC); assertTrue(testInstance.checkIsCompressed()); testInstance.setName(TestCWARC); assertTrue(testInstance.checkIsCompressed()); } catch(Exception e) { fail(e.getMessage()); } }