### Question:
WMSLayer extends AbstractModel implements ImageProvider<TileImageKey> { public Vector2d getMinimumGridSize() { return myLayerCellDimensions.get(myLayerCellDimensions.size() - 1); } WMSLayer(Builder builder); static List<Vector2d> createQuadSplitLayerCellDimensions(int numLevels, double levelZeroSizeD); static PropertyAccessor<WMSLayer, String> getKeyAccessor(); Collection<GeographicBoundingBox> generateFixedGrid(int level); Collection<GeographicBoundingBox> generateGrid(int level); WMSLayerConfig getConfiguration(); @Override Image getImage(TileImageKey key); ImageProvider<TileImageKey> getImageProvider(); int getMaximumDisplaySize(); int getMinimumDisplaySize(); Vector2d getMinimumGridSize(); TimeSpan getTimeSpan(); String getTitle(); WMSDataTypeInfo getTypeInfo(); Duration getValidDuration(); boolean isTimeless(); @Override String toString(); static final PropertyDescriptor<WMSLayer> PROPERTY_DESCRIPTOR; static final PropertyDescriptor<String> KEY_PROPERTY_DESCRIPTOR; }### Answer:
@Test public void testGetMinimumGridSize() { List<Vector2d> layerCellDimensions = new ArrayList<Vector2d>(); Vector2d twentyByTwenty = new Vector2d(20., 20.); Vector2d tenByTen = new Vector2d(10., 10.); Vector2d fiveByFive = new Vector2d(5., 5.); layerCellDimensions.add(twentyByTwenty); layerCellDimensions.add(tenByTen); layerCellDimensions.add(fiveByFive); WMSLayerConfig conf = createLayerConfig(GeographicBoundingBox.WHOLE_GLOBE); WMSDataTypeInfo info = new WMSDataTypeInfo(getToolbox(), (Preferences)null, DATA_TYPE_HOST_NAME, new WMSLayerConfigurationSet(null, conf, null), conf.getLayerKey(), conf.getLayerTitle()); WMSLayer.Builder builder = new WMSLayer.Builder(info); builder.setLayerCellDimensions(layerCellDimensions); WMSLayer wmsLayer = new WMSLayer(builder); Vector2d minimumGridSize = wmsLayer.getMinimumGridSize(); assertEquals(fiveByFive, minimumGridSize); layerCellDimensions.clear(); layerCellDimensions.add(fiveByFive); layerCellDimensions.add(twentyByTwenty); layerCellDimensions.add(tenByTen); wmsLayer = new WMSLayer(builder); minimumGridSize = wmsLayer.getMinimumGridSize(); assertEquals(fiveByFive, minimumGridSize); }