### Question:
AlosAV2Metadata extends XmlMetadata { public String[] getBandNames() { int nBands = getNumBands(); String[] names = new String[nBands]; for (int i = 0; i < nBands; i++) { names[i] = getAttributeValue(AlosAV2Constants.PATH_BAND_DESCRIPTION, i, AlosAV2Constants.DEFAULT_BAND_NAMES[i]); if (names[i].contains(",") || names[i].contains("(")) { String betweenBrackets = null; if (names[i].contains("(")) { betweenBrackets = names[i].substring(names[i].indexOf("(")+1, names[i].indexOf(")")+1); if (betweenBrackets.contains(",")) { betweenBrackets = betweenBrackets.substring(0, betweenBrackets.indexOf(",")); } } if (betweenBrackets != null) { names[i] = betweenBrackets; } } if(names[i].contains(" ")){ names[i] = names[i].replace(" ","_"); } } return names; } AlosAV2Metadata(String name); @Override String getFileName(); @Override String getProductName(); @Override 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(); Map<String, String> getBandUnits(); @Override int getNumBands(); int getNoDataValue(); Color getNoDataColor(); int getSaturatedPixelValue(); Color getSaturatedColor(); ProductData.UTC getCenterTime(); float getGain(final String bandName); float getBias(final String bandName); String getProcessingLevel(); InsertionPoint[] getGeopositionPoints(); int getPixelDataType();  }### Answer:
@Test public void testGetBandNames() throws Exception { String[] bandNames = metadata.getBandNames(); assertNotNull(bandNames); assertEquals(bandNames.length, 4); assertEquals(AlosAV2Constants.DEFAULT_BAND_NAMES[0], bandNames[0]); assertEquals(AlosAV2Constants.DEFAULT_BAND_NAMES[1], bandNames[1]); assertEquals(AlosAV2Constants.DEFAULT_BAND_NAMES[2], bandNames[2]); assertEquals(AlosAV2Constants.DEFAULT_BAND_NAMES[3], bandNames[3]); }