Range implements Serializable { public String getLabel() { if (period == null) { final DateFormat dateFormat = I18N.createDateFormat(); return dateFormat.format(startDate) + " - " + dateFormat.format(endDate); } return period.getLabel(); } private  Range(Period period, Date startDate, Date endDate); static Range createCustomRange(Date startDate, Date endDate); static Range parse(String value, DateFormat dateFormat); Period getPeriod(); Date getStartDate(); Date getEndDate(); String getValue(); String getLabel(); @Override String toString(); static final char CUSTOM_PERIOD_SEPARATOR; }
@Test public void testGetLabel() { assertNotNull("getLabel", periodRange.getLabel()); assertNotNull("getLabel", customRange.getLabel()); }