RunIndexWrapper { public abstract List<UrlPacket> getUrlPackets(); RunIndexWrapper(Run<T> objectToRunWrapper); static void cleanUrlFromExecutionData(Url url); Optional<Url> getTestUrl(String testName, final String urlName); Optional<Test> getTest(String testName); Run<T> get(); abstract List<UrlPacket> getUrlPackets(); abstract int countUrls(); @Override String toString();  }
@Test public void getUrlPackets_expectTwo() { prepareTwoUrls(); List<UrlPacket> packets = testRunIndexWrapper.getUrlPackets(); Long urlsCount = packets.stream().map(UrlPacket::getUrls).mapToLong(List::size).sum(); assertThat(urlsCount, is(2L)); }
@Test public void getUrlPackets_expectZero() { List<UrlPacket> packets = testRunIndexWrapper.getUrlPackets(); Long urlsCount = packets.stream().map(UrlPacket::getUrls).mapToLong(List::size).sum(); assertThat(urlsCount, is(0L)); }