@Test
public void onlyMaxHostsCollected() {

    Map<String, Long> map = ImmutableMap.of("a", 8L, "b", 3L, "c", 1L, "d", 3L);
    Map<String, Long> actual = logger.getTopElements(map);
    Map<String, Long> expected = ImmutableMap.of("a", 8L, "b", 3L, "d", 3L);
    assertEquals(expected, actual);
}