SmartHostSelectionStrategy extends RandomHostSelectionStrategy implements UpdatableSelectionStrategy { @Override public Host selectHost(List<Host> hosts) { return selectRandom(hosts, this::toFreePercentage); }  void updateHubSummaries(List<HubSummary> hubSummaries, long timestamp); @Override long getTimestamp(); @Override Map<String, Integer> getHubs(); @Override Region selectRegion(List<Region> allRegions, List<Region> unvisitedRegions); @Override Host selectHost(List<Host> hosts); boolean isUpdatedRecently(HubSummary hub);  }
@Test public void testSelectWithEmptySummariesMap() { assertThat(strategy.selectHost(singletonList(HOST_1)), is(equalTo(HOST_1))); }