### Question:
SpotViewMetadata extends XmlMetadata { public int getRasterDataType() { int value = 0, retVal; MetadataElement currentElement; if ((currentElement = rootElement.getElement(SpotConstants.TAG_IMAGE)) != null) { try { value = Integer.parseInt(currentElement.getAttributeString(SpotConstants.TAG_BITS_PER_PIXEL)); } catch (NumberFormatException e) { logger.warning(String.format(MISSING_ELEMENT_WARNING, SpotConstants.TAG_BITS_PER_PIXEL)); } } else { logger.warning(String.format(MISSING_ELEMENT_WARNING, SpotConstants.TAG_BITS_PER_PIXEL)); } switch (value) { case 1: retVal = ProductData.TYPE_UINT8; break; case 2: retVal = ProductData.TYPE_INT16; break; case 3: retVal = ProductData.TYPE_INT32; break; case 4: retVal = ProductData.TYPE_FLOAT32; break; default: retVal = ProductData.TYPE_UINT8; break; } return retVal; } 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 testGetRasterDataType() throws Exception { assertEquals(ProductData.TYPE_UINT8, metadata.getRasterDataType()); }