public void testAdaptLine() { DeduplicateToCDXAdapterInterface adapter = new DeduplicateToCDXAdapter(); String cdx_line = adapter.adaptLine(DEDUP_CRAWL_STRING); CDXLineToSearchResultAdapter adapter2 = new CDXLineToSearchResultAdapter(); CaptureSearchResult result = adapter2.adapt(cdx_line); assertEquals( "Should get the arcfilename back out of the cdx line", "1-1-20090513141823-00008-sb-test-har-001.statsbiblioteket.dk.arc", result.getFile()); assertEquals("Should get the right http code out of the cdx line", "200", result.getHttpCode()); String cdx_line2 = adapter.adaptLine(DEDUP_CRAWL_STRING2); CaptureSearchResult result2 = adapter2.adapt(cdx_line2); assertEquals( "Should get the arcfilename back out of the cdx line", "118657-119-20110428163750-00001-kb-prod-har-004.kb.dk.arc", result2.getFile()); assertEquals( "Should get the right http code out of the cdx line", "200", result2.getHttpCode()); }