### Question:
Points { public Class getDataClass() { if (points.size() == 0) throw new IllegalStateException(""); return points.values().iterator().next().data.getClass(); } Points(); void add(Point<T> point); Map<Long, Point<T>> getPoints(); boolean isEmpty(); Class getDataClass();  }### Answer:
@Test(expected=IllegalStateException.class) public void getDataClassOnEmptyObjectThrowsException() { Points<SimpleNumber> points = new Points<SimpleNumber>(); Class actual = points.getDataClass(); }