@Test
void testTreeMapReverseOrdering() {

    Comparator<Long> comparator = Comparator.reverseOrder();
    NavigableMap<Long, String> treeMap = new TreeMap<>(comparator);
    treeMap.put(1L, "one");
    treeMap.put(3L, "three");
    treeMap.put(5L, "five");
    treeMap.put(7L, "seven");
    treeMap.forEach((key, value) ->
            LOGGER.info("{} => {}", key, value));
    assertThat(treeMap.ceilingEntry(3L).getValue()).isEqualTo("three");
    assertThat(treeMap.ceilingEntry(4L).getValue()).isEqualTo("three");
    assertThat(treeMap.ceilingEntry(9L).getValue()).isEqualTo("seven");
    Map.Entry<Long, String> entryThree = treeMap.ceilingEntry(4L);
    LOGGER.info("------------------");
    SortedMap<Long, String> partMap = treeMap.tailMap(4L);
    partMap.forEach((key, value) ->
            LOGGER.info("{} => {}", key, value));
    assertThat(treeMap.floorEntry(-1L).getValue()).isEqualTo("one");
    assertThat(treeMap.floorEntry(3L).getValue()).isEqualTo("three");
    assertThat(treeMap.floorEntry(4L).getValue()).isEqualTo("five");
}