final int recordCountQueryCount = getLatestQueryCount(); log.info("QUERYING ALL RECORDS..."); final List<Record> records = allRecordsFinder.stream().sorted(BY_DISPLAY_NAME).collect(toList()); records.forEach(record -> pw.printf(" %s - %d tracks - %s%n", displayNameOf(record), final RecordFinder recordFinder = artist.findRecords(); pw.printf("%nRECORDS OF %s (%d):%n", displayNameOf(artist), recordFinder.count()); recordFinder.stream().forEach(record -> pw.printf(" %s%n", displayNameOf(record))); recordFinder.stream().forEach(record -> assertEquals(record.getSource(), artist.getSource())); pw.printf(" RETRIEVED BY %d QUERIES%n", getLatestQueryCount()); });