### Question:
SpotDimapMetadata extends XmlMetadata { public HashMap<String, Double> getStatistics(int bandIndex) { if (bandStatistics == null) { bandStatistics = new ArrayList<HashMap<String, Double>>(getNumBands()); if (rootElement != null) { MetadataElement currentElement; if ((currentElement = rootElement.getElement(SpotConstants.TAG_IMAGE_DISPLAY)) != null) { MetadataElement[] elements = currentElement.getElements(); int bIdx; for (MetadataElement element : elements) { if (SpotConstants.TAG_BAND_STATISTICS.equals(element.getName())) { final double min = Double.parseDouble(element.getAttributeString(SpotConstants.TAG_STX_MIN, "0")); final double max = Double.parseDouble(element.getAttributeString(SpotConstants.TAG_STX_MAX, "0")); final double mean = Double.parseDouble(element.getAttributeString(SpotConstants.TAG_STX_MEAN, "0")); final double stdv = Double.parseDouble(element.getAttributeString(SpotConstants.TAG_STX_STDV, "0")); final double linMin = Double.parseDouble(element.getAttributeString(SpotConstants.TAG_STX_LIN_MIN, "0")); final double linMax = Double.parseDouble(element.getAttributeString(SpotConstants.TAG_STX_LIN_MAX, "0")); bIdx = Integer.parseInt(element.getAttributeString(SpotConstants.TAG_BAND_INDEX, "0")); HashMap<String, Double> hashMap = new HashMap<String, Double>() {{ put(SpotConstants.TAG_STX_MIN, min); put(SpotConstants.TAG_STX_MAX, max); put(SpotConstants.TAG_STX_MEAN, mean); put(SpotConstants.TAG_STX_STDV, stdv); put(SpotConstants.TAG_STX_LIN_MIN, linMin); put(SpotConstants.TAG_STX_LIN_MAX, linMax); }}; if (bIdx > 0) { bandStatistics.add(bIdx - 1, hashMap); } else { bandStatistics.add(hashMap); } } } } } } return bandStatistics.size() > 0 ? bandStatistics.get(bandIndex) : null; } 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 testGetStatistics() throws Exception { assertEquals(null, metadata.getStatistics(0)); }