### Question:
RapidEyeMetadata extends XmlMetadata { public float[] getCornersLongitudes() { float[] longs = null; MetadataElement currentElement; if (((currentElement = rootElement.getElement(RapidEyeConstants.TAG_TARGET)) != null) && ((currentElement = currentElement.getElement(RapidEyeConstants.TAG_FOOTPRINT)) != null) && ((currentElement = currentElement.getElement(RapidEyeConstants.TAG_GEOGRAPHIC_LOCATION)) != null)) { MetadataElement[] pointElements = currentElement.getElements(); longs = new float[4]; for (MetadataElement element : pointElements) { try { if (RapidEyeConstants.TAG_TOP_LEFT.equals(element.getName())) { longs[0] = Float.parseFloat(element.getAttributeString(RapidEyeConstants.TAG_LONGITUDE, "")); } else if (RapidEyeConstants.TAG_TOP_RIGHT.equals(element.getName())) { longs[1] = Float.parseFloat(element.getAttributeString(RapidEyeConstants.TAG_LONGITUDE, "")); } else if (RapidEyeConstants.TAG_BOTTOM_LEFT.equals(element.getName())) { longs[2] = Float.parseFloat(element.getAttributeString(RapidEyeConstants.TAG_LONGITUDE, "")); } else if (RapidEyeConstants.TAG_BOTTOM_RIGHT.equals(element.getName())) { longs[3] = Float.parseFloat(element.getAttributeString(RapidEyeConstants.TAG_LONGITUDE, "")); } } catch (NumberFormatException e) { logger.severe("One of the corner longitudes is not in the expected format. Product will not have associated geocoding."); } } } return longs; } RapidEyeMetadata(String name); @Override String getFileName(); @Override int getNumBands(); @Override String getProductName(); @Override String getFormatName(); @Override String getMetadataProfile(); @Override String getProductDescription(); @Override int getRasterWidth(); @Override int getRasterHeight(); String getBrowseFileName(); String getMaskFileName(); @Override String[] getRasterFileNames(); SpatialReferenceSystem getReferenceSystem(); ProductData.UTC getProductStartTime(); ProductData.UTC getProductEndTime(); ProductData.UTC getCenterTime(); float getScaleFactor(int bandIndex); int getPixelFormat(); float[] getCornersLatitudes(); float[] getCornersLongitudes(); RationalCoefficients getRationalPolinomialCoefficients();  }### Answer:
@Test public void testGetCornersLongitudes() throws Exception { assertEquals(15.082264, metadata.getCornersLongitudes()[0], 0.001); assertEquals(16.193775, metadata.getCornersLongitudes()[1], 0.001); assertEquals(14.893127, metadata.getCornersLongitudes()[2], 0.001); assertEquals(15.994719, metadata.getCornersLongitudes()[3], 0.001); }