### Question:
DeimosMetadata extends XmlMetadata { public ProductData.UTC getCenterTime() { ProductData.UTC centerTime = null; String stringDate = getAttributeValue(DeimosConstants.PATH_SCENE_CENTER_DATE, null); if (stringDate != null) { String stringTime = getAttributeValue(DeimosConstants.PATH_SCENE_CENTER_TIME, null); if (stringTime == null) { warn(MISSING_ELEMENT_WARNING, DeimosConstants.PATH_SCENE_CENTER_TIME); stringTime = "00:00:00"; } centerTime = parseDate(stringDate + " " + stringTime, DeimosConstants.DEIMOS_DATE_FORMAT); } else { warn(MISSING_ELEMENT_WARNING, DeimosConstants.PATH_SCENE_CENTER_DATE); } return centerTime; } DeimosMetadata(String name); @Override String getFileName(); @Override String getProductName(); String getProductDescription(); @Override String getFormatName(); @Override String getMetadataProfile(); @Override int getRasterWidth(); @Override int getRasterHeight(); @Override String[] getRasterFileNames(); @Override ProductData.UTC getProductStartTime(); @Override ProductData.UTC getProductEndTime(); String[] getBandNames(); String[] getBandUnits(); @Override int getNumBands(); int getNoDataValue(); Color getNoDataColor(); int getSaturatedPixelValue(); Color getSaturatedColor(); ProductData.UTC getCenterTime(); String getProcessingLevel(); InsertionPoint[] getGeopositionPoints();  }### Answer:
@Test public void testGetCenterTime() throws Exception { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); sdf.setTimeZone(TimeZone.getTimeZone("UTC")); Date time = sdf.parse("2012-09-05 17:06:09"); assertEquals(time.getTime(), metadata.getCenterTime().getAsDate().getTime()); }