DefaultKeyedValues data = new DefaultKeyedValues();
data.addValue("C", new Double(1.0));
data.addValue("B", null);
data.addValue("D", new Double(3.0));
data.addValue("A", new Double(2.0));
data.sortByKeys(SortOrder.ASCENDING);
// check key order
assertEquals(data.getKey(0), "A");