@Test void testEmptyResponse() { ScoreCalculator calculator = new ScoreCalculator(config.getRoot()); assertThat(calculator.pickBestResponse(null), is(nullValue())); assertThat(calculator.pickBestResponse(new HashSet<>()), is(nullValue())); }
public PlaceResponse pickBestResponse(Set<PlaceResponse> responses) { if (responses == null || responses.isEmpty()) { return null; } return scoreOrdering.reverse().sortedCopy(responses).get(0); }
ScoreCalculator { public PlaceResponse pickBestResponse(Set<PlaceResponse> responses) { if (responses == null || responses.isEmpty()) { return null; } return scoreOrdering.reverse().sortedCopy(responses).get(0); } }
ScoreCalculator { public PlaceResponse pickBestResponse(Set<PlaceResponse> responses) { if (responses == null || responses.isEmpty()) { return null; } return scoreOrdering.reverse().sortedCopy(responses).get(0); } ScoreCalculator(SchedulingConfig config); }
ScoreCalculator { public PlaceResponse pickBestResponse(Set<PlaceResponse> responses) { if (responses == null || responses.isEmpty()) { return null; } return scoreOrdering.reverse().sortedCopy(responses).get(0); } ScoreCalculator(SchedulingConfig config); PlaceResponse pickBestResponse(Set<PlaceResponse> responses); }
ScoreCalculator { public PlaceResponse pickBestResponse(Set<PlaceResponse> responses) { if (responses == null || responses.isEmpty()) { return null; } return scoreOrdering.reverse().sortedCopy(responses).get(0); } ScoreCalculator(SchedulingConfig config); PlaceResponse pickBestResponse(Set<PlaceResponse> responses);  }