### Question:
SpotDimapMetadata extends XmlMetadata { public String[] getBandUnits() { if (rootElement == null) { return null; } String[] units = new String[getNumBands()]; MetadataElement currentElement; if ((currentElement = rootElement.getElement(SpotConstants.TAG_IMAGE_INTERPRETATION)) != null) { MetadataElement[] bandInfo = currentElement.getElements(); for (int i = 0; i < bandInfo.length; i++) { units[i] = bandInfo[i].getAttributeString(SpotConstants.TAG_PHYSICAL_UNIT, SpotConstants.DEFAULT_SPOT_UNIT); } } else { for (int i = 0; i < units.length; i++) { units[i] = SpotConstants.DEFAULT_SPOT_UNIT; } logger.warning(String.format(MISSING_ELEMENT_WARNING, SpotConstants.TAG_PHYSICAL_UNIT)); } return units; } 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 testGetBandUnits() throws Exception { assertEquals(4, metadata.getBandUnits().length); assertEquals("equivalent radiance (W.m-2.Sr-1.um-1)", metadata.getBandUnits()[0]); assertEquals("equivalent radiance (W.m-2.Sr-1.um-1)", metadata.getBandUnits()[1]); assertEquals("equivalent radiance (W.m-2.Sr-1.um-1)", metadata.getBandUnits()[2]); assertEquals("equivalent radiance (W.m-2.Sr-1.um-1)", metadata.getBandUnits()[3]); }