### Question:
AvroTimeHelper { public TimeSpan span(GenericRecord rec) { Date start = parseDate(valNonNull(rec, startKey)); Date end = parseDate(valNonNull(rec, endKey)); return TimeSpan.spanOrPt(start, end); } AvroTimeHelper(DataTypeInfo dti); DataTypeInfo getType(); TimeSpan span(GenericRecord rec);  }### Answer:
@Test public void test() { EasyMockSupport support = new EasyMockSupport(); DataTypeInfo type = createDataType(support); long startTime = System.currentTimeMillis() - 1000; long endTime = System.currentTimeMillis(); GenericRecord record = createRecord(support, startTime, endTime); support.replayAll(); AvroTimeHelper helper = new AvroTimeHelper(type); TimeSpan span = helper.span(record); assertEquals(startTime, span.getStart()); assertEquals(endTime, span.getEnd()); support.verifyAll(); }