### Question:
Kompsat2Metadata extends XmlMetadata { @Override public ProductData.UTC getProductEndTime() { ProductData.UTC date = null; String value = null; try { value = getAttributeValue(Kompsat2Constants.PATH_END_TIME, null); } catch (Exception e) { warn(MISSING_ELEMENT_WARNING, Kompsat2Constants.PATH_END_TIME); } if (value != null && !value.isEmpty()) { date = DateHelper.parseDate(value, Kompsat2Constants.KOMPSAT2_UTC_DATE_FORMAT); } return date; } Kompsat2Metadata(String name); @Override int getNumBands(); @Override String getProductName(); @Override String getFormatName(); @Override int getRasterWidth(); @Override int getRasterHeight(); @Override String[] getRasterFileNames(); @Override ProductData.UTC getProductStartTime(); String getProductType(); @Override ProductData.UTC getProductEndTime(); @Override ProductData.UTC getCenterTime(); @Override String getProductDescription(); @Override String getFileName(); @Override String getMetadataProfile(); Kompsat2Component getMetadataComponent(); void setMetadataComponent(Kompsat2Component component); static float[][] parseTiePointGridAttribute(String tiePointGridPointsString);  }### Answer:
@Test public void testGetProductEndTime() throws Exception { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); sdf.setTimeZone(TimeZone.getTimeZone("UTC")); Date time = sdf.parse("2011-09-20T01:32:03.730Z"); assertEquals(time.getTime(), metadata.getProductEndTime().getAsDate().getTime()); }