### Question:
SpotViewMetadata extends XmlMetadata { public String[] getBandNames() { if (rootElement == null) { return null; } String[] names = 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++) { names[i] = bandInfo[i].getAttributeString(SpotConstants.TAG_BAND_DESCRIPTION, SpotConstants.DEFAULT_BAND_NAME_PREFIX + i); } } else { for (int i = 0; i < names.length; i++) { names[i] = SpotConstants.DEFAULT_BAND_NAME_PREFIX + i; } logger.warning(String.format(MISSING_ELEMENT_WARNING, SpotConstants.TAG_BAND_DESCRIPTION)); } return names; } SpotViewMetadata(String name); @Override String getFileName(); @Override String getProductName(); @Override String getProductDescription(); @Override int getNumBands(); @Override String getFormatName(); @Override String getMetadataProfile(); @Override int getRasterWidth(); @Override int getRasterHeight(); @Override String[] getRasterFileNames(); @Override ProductData.UTC getProductStartTime(); @Override ProductData.UTC getProductEndTime(); @Override ProductData.UTC getCenterTime(); String[] getBandNames(); ByteOrder getRasterJavaByteOrder(); int getRasterDataType(); int getRasterPixelSize(); float getRasterGeoRefX(); float getRasterGeoRefY(); float getRasterGeoRefSizeX(); float getRasterGeoRefSizeY(); @SuppressWarnings("SameReturnValue") String getGeolayerFileName(); int getGeolayerNumBands(); int getGeolayerWidth(); int getGeolayerHeight(); ByteOrder getGeolayerJavaByteOrder(); int getGeolayerPixelSize(); int getGeolayerDataType(); String getProjectionCode();  }### Answer:
@Test public void testGetBandNames() throws Exception { assertEquals(4, metadata.getBandNames().length); assertEquals("band_0", metadata.getBandNames()[0]); assertEquals("band_1", metadata.getBandNames()[1]); assertEquals("band_2", metadata.getBandNames()[2]); assertEquals("band_3", metadata.getBandNames()[3]); }