@Test
void getSortedMap()
{

    SortedMap<Double, Integer> result = this.tool.getSortedMap();
    assertNotNull(result, "Returned null instead of a map");
    assertTrue(result.isEmpty(), "Returned map wasn't initially empty");
    // Check that the map is indeed sorted by the key
    Random r = new Random();
    for (int i = 0; i < 100; ++i) {
        result.put(r.nextDouble(), i);
    }
    Double d = 0.0;
    for (Map.Entry<Double, Integer> e : result.entrySet()) {
        assertTrue(e.getKey() >= d, "Map doesn't preserve the natural order of the elements");
        d = e.getKey();
    }
}