dataset.setValue("A", 1.0);
dataset.setValue("B", 2.0);
dataset.setValue("C", 3.0);
PieDatasetSelectionExtension<String> ext = new
PieDatasetSelectionExtension<String>(dataset);
PieCursor cursor = new PieCursor("B");
assertFalse(ext.isSelected(cursor));
ext.setSelected(cursor, true);
assertTrue(ext.isSelected(cursor));
cursor.setPosition("A");
assertFalse(ext.isSelected(cursor));
dataset.remove("B");
assertFalse(ext.isSelected(cursor));
cursor.setPosition("B");
// fetching the value for a key that does not exist
try {
ext.isSelected(cursor);
fail("Expected an UnknownKeyException.");
} catch (UnknownKeyException e) {