### Question:
DefaultPieDataset extends AbstractDataset implements PieDataset, Cloneable, PublicCloneable, Serializable { @Override public Number getValue(int item) { Number result = null; if (getItemCount() > item) { result = this.data.getValue(item); } return result; } DefaultPieDataset();  DefaultPieDataset(KeyedValues data); @Override int getItemCount(); @Override List<Comparable> getKeys(); @Override Comparable getKey(int item); @Override int getIndex(Comparable key); @Override Number getValue(int item); @Override Number getValue(Comparable key); void setValue(Comparable key, Number value); void setValue(Comparable key, double value); void insertValue(int position, Comparable key, double value); void insertValue(int position, Comparable key, Number value); void remove(Comparable key); void clear(); void sortByKeys(SortOrder order); void sortByValues(SortOrder order); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone();  }### Answer:
@Test public void testGetValue() { DefaultPieDataset d = new DefaultPieDataset(); d.setValue("A", 5.0); assertEquals(5.0, d.getValue("A").doubleValue(), EPSILON); try { d.getValue("KEY_THAT_DOES_NOT_EXIST"); fail("Expected an UnknownKeyException."); } catch (UnknownKeyException e) { } }