Time extends Response { @Override public String toString() { return this.time[0] + "|" + this.time[1]; } Time();  Time(String[] dateRange); void setTime(String[] time); String[] getTime(); void setStarttime(TimeBreakdown starttime); TimeBreakdown getStarttime(); void setEndtime(TimeBreakdown endtime); TimeBreakdown getEndtime(); @Override String toXML(); @Override String toString(); static Time buildFromCache(ResponseCache.CacheIdentifier ci); @Override boolean writeToCache(ResponseCache.CacheIdentifier ci);  }
@Test public void testCreateTimeString() { String[] input = new String[]{"2001-07-01T01:01:01Z", "2002-07-15T01:01:01Z"}; Time bean = null; try { bean = new Time(input); } catch (ParseException ex) { fail(ex.getMessage()); } String result = bean.toString(); assertNotNull(result); assertEquals(result, "2001-07-01T01:01:01Z|2002-07-15T01:01:01Z"); }