@Test
/**
 * The map numbers can go from higher to lower or from lower to higher.
 * After merge make sure the numbers are not skipping any.
 */
public void orderBottomUp() {

    final HashMap<InterpolationVariable, Integer> map = new HashMap<>();
    map.put(new InterpolationVariable("var",
                                      DataType.TYPE_DATE,
                                      "Person",
                                      "birthday"), 2);
    map.put(new InterpolationVariable("var",
                                      DataType.TYPE_DATE,
                                      "Person",
                                      "dateOfDeath"), 1);
    map.put(new InterpolationVariable("p",
                                      DataType.TYPE_DATE,
                                      "Person",
                                      "dateOfDeath"), 0);
    final Map<InterpolationVariable, Integer> result = new InterpolationVariableCollector(map).getMap();
    assertEquals(2, result.size());
    final Iterator<Integer> iterator = result.values().iterator();
    assertEquals(0, (int) iterator.next());
    assertEquals(1, (int) iterator.next());
}