@Test
public void distance() {

    HashMap<Integer, Integer> bijection = new HashMap<>();
    bijection.put(1, 14);
    bijection.put(2, 14);
    bijection.put(3, 14);
    bijection.put(4, 14);
    bijection.put(5, 14);
    bijection.put(6, 14);
    bijection.put(7, 14);
    bijection.put(8, 14);
    bijection.put(9, 14);
    IntHashMap<String> directPositionMap = (IntHashMap<String>)bijectionHashFunctionMap(bijection);
    directPositionMap.put(1, value(1));
    directPositionMap.put(2, value(2));
    directPositionMap.put(3, value(3));
    directPositionMap.put(4, value(4));
    directPositionMap.put(5, value(5));
    directPositionMap.put(6, value(6));
    directPositionMap.put(7, value(7));
    directPositionMap.put(8, value(8));
    directPositionMap.put(9, value(9));
    assertEquals(0, directPositionMap.distance(14, 1));
    assertEquals(1, directPositionMap.distance(15, 1));
    assertEquals(2, directPositionMap.distance(0, 1));
    assertEquals(3, directPositionMap.distance(1, 1));
    assertEquals(4, directPositionMap.distance(2, 1));
    assertEquals(5, directPositionMap.distance(3, 1));
    assertEquals(15, directPositionMap.distance(13, 1));
}