### Question:
SpotDimapMetadata extends XmlMetadata { public int getPixelDataType() { int value = 0, retVal; MetadataElement currentElement; if ((currentElement = rootElement.getElement(SpotConstants.TAG_RASTER_ENCODING)) != null) { value = Integer.parseInt(currentElement.getAttributeString(SpotConstants.TAG_NBITS, "0")); } else { logger.warning(String.format(MISSING_ELEMENT_WARNING, SpotConstants.TAG_NBITS)); } switch (value) { case 8: retVal = ProductData.TYPE_UINT8; break; case 16: retVal = ProductData.TYPE_INT16; break; case 32: retVal = ProductData.TYPE_FLOAT32; break; default: retVal = ProductData.TYPE_UINT8; break; } return retVal; } 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 testGetPixelDataType() throws Exception { assertEquals(20, metadata.getPixelDataType()); }