HarLog { public List<HarEntry> findEntries(Pattern url) { return findEntries(new HarEntriesUrlPatternFilter(url)); }  String getVersion(); void setVersion(String version); HarCreatorBrowser getCreator(); void setCreator(HarCreatorBrowser creator); HarCreatorBrowser getBrowser(); void setBrowser(HarCreatorBrowser browser); List<HarPage> getPages(); void setPages(List<HarPage> pages); List<HarEntry> getEntries(); void setEntries(List<HarEntry> entries); String getComment(); void setComment(String comment); @Override boolean equals(Object o); @Override int hashCode(); Optional<HarEntry> findMostRecentEntry(Pattern url); List<HarEntry> findEntries(Pattern url);  }
@Test public void testFindEntries() { Pattern urlPattern = Pattern.compile("http: HarLog log = new HarLog(); int entriesNumber = 10; for (int i = 0; i < entriesNumber; i++) { HarEntry entry = new HarEntry(); HarRequest request1 = new HarRequest(); request1.setUrl("http: entry.setRequest(request1); log.getEntries().add(entry); } Assert.assertEquals("Expected to find all entries", log.findEntries(urlPattern).size(), entriesNumber); }