### Question:
SpotDimapMetadata extends XmlMetadata { public ProductData.UTC getCenterTime() { ProductData.UTC centerTime = null; MetadataElement currentElement; if (((currentElement = rootElement.getElement(SpotConstants.TAG_DATA_STRIP)) != null) && ((currentElement = currentElement.getElement(SpotConstants.TAG_SENSOR_CONFIGURATION)) != null) && ((currentElement = currentElement.getElement(SpotConstants.TAG_TIME_STAMP)) != null)) { String stringData = currentElement.getAttributeString(SpotConstants.TAG_SCENE_CENTER_TIME); centerTime = DateHelper.parseDate(stringData, SpotConstants.UTC_DATE_FORMAT); } else { logger.warning(String.format(MISSING_ELEMENT_WARNING, SpotConstants.TAG_SCENE_CENTER_TIME)); } return centerTime; } SpotDimapMetadata(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(); float getWavelength(int bandIndex); float getBandwidth(int bandIndex); ProductData.UTC getCenterTime(); TiePoint[] getTiePoints(); InsertionPoint getInsertPoint(); double getScalingFactor(int bandIndex); double getScalingOffset(int bandIndex); float getGain(int bandIndex); String getCRSCode(); double getOrientation(); Point2D.Float[] getCornerCoordinates(); HashMap<String, Double> getStatistics(int bandIndex); int getPixelDataType();  }### Answer:
@Test public void testGetCenterTime() throws Exception { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); sdf.setTimeZone(TimeZone.getTimeZone("UTC")); Date expected = sdf.parse("2007-05-04 10:18:44.370"); assertEquals(expected.getTime(), metadata.getCenterTime().getAsDate().getTime()); assertEquals(370000, metadata.getCenterTime().getMicroSecondsFraction()); }