### Question:
DurationPresentation extends AbstractObservable { public int getQuantity() { d_data = parseDuration(); return d_data == null ? DEFAULT_DATA.quantity : d_data.quantity; } DurationPresentation(T bean); static Data parseDuration(Duration duration, DateUnits prevUnits); DateUnits getUnits(); void setUnits(DateUnits units); int getQuantity(); void setQuantity(int quantity); boolean getDefined(); void setDefined(boolean defined); static Duration generateDuration(String duration); String getLabel(); @Override String toString(); static final String PROPERTY_DEFINED; static final String PROPERTY_DURATION_QUANTITY; static final String PROPERTY_DURATION_UNITS; static final String PROPERTY_LABEL; }### Answer:
@Test public void testGetQuantity() { assertEquals(6, (int)d_pm1.getQuantity()); assertEquals(0, (int)d_pm2.getQuantity()); assertEquals(3, (int)d_pm3.getQuantity()); }