### Question:
NcAaiProductReader extends NetcdfProductReaderTemplate { @Override protected void setTime(Product product) { final String name = product.getName(); if (name.matches("aai_[0-9]{8}.*\\.nc")) { final String timeString = name.substring(4, 12); try { final ProductData.UTC startTime = ProductData.UTC.parse(timeString, "yyyyMMdd"); product.setStartTime(startTime); final ProductData.UTC endTime = new ProductData.UTC(startTime.getDaysFraction() + 1, 0, 0); product.setEndTime(endTime); } catch (ParseException ignored) { } } } NcAaiProductReader(ProductReaderPlugIn readerPlugIn);   }### Answer:
@Test public void testSetTime() throws Exception { reader.setTime(product); final ProductData.UTC productStartTime = product.getStartTime(); final ProductData.UTC expectedStartTime = ProductData.UTC.parse("2010-12-24-00-00", "yyyy-MM-dd-HH-mm"); assertNotNull(productStartTime); assertEquals(expectedStartTime.getMJD(), productStartTime.getMJD(), 0.0); final ProductData.UTC productEndTime = product.getEndTime(); final ProductData.UTC expectedEndTime = ProductData.UTC.parse("2010-12-25-00-00", "yyyy-MM-dd-HH-mm"); assertNotNull(productEndTime); assertEquals(expectedEndTime.getMJD(), productEndTime.getMJD(), 0.0); }