### Question:
AlosPRIMetadata extends XmlMetadata { @Override public int getRasterWidth() { if (componentMetadata.get(0).hasInsertPoint()) { return (int) ((getMaxPoint().get("x") - getMinInsertPointX()) / 2.5); } else { return componentMetadata.stream() .filter(metadata -> metadata instanceof ImageMetadata) .map(metadata -> metadata) .map(ImageMetadata::getRasterWidth) .collect(Collectors.maxBy(Integer::compare)) .get(); } } AlosPRIMetadata(String name); @Override int getNumBands(); @Override String getProductName(); @Override String getFormatName(); @Override int getRasterWidth(); @Override int getRasterHeight(); @Override String[] getRasterFileNames(); @Override ProductData.UTC getProductStartTime(); @Override ProductData.UTC getProductEndTime(); @Override ProductData.UTC getCenterTime(); @Override String getProductDescription(); @Override String getFileName(); @Override String getMetadataProfile(); boolean hasInsertPoint(); float getMaxInsertPointX(); float getMaxInsertPointY(); float getMinInsertPointX(); float getMinInsertPointY(); float getStepSizeX(); float getStepSizeY(); Map<String, Float[]> bandOffset(); String getCrsCode(); ImageMetadata.InsertionPoint getProductOrigin(); Map<String, Float> getMaxPoint(); float[][] getMaxCorners(); List<ImageMetadata> getImageMetadataList(); void setComponentMetadata(List<ImageMetadata> componentMetadata); @Deprecated void addComponentMetadata(File metadata); boolean isMultiSize();  }### Answer:
@Test public void testGetRasterWidth() throws Exception { assertEquals(25629, metadata.getRasterWidth()); }