ShapeInMemLayer extends FeatureSourceRetriever implements VectorLayer { @Override public Envelope getBounds() throws LayerException { return getBounds(Filter.INCLUDE); }  @Override String getId(); void setId(String id); @Override CoordinateReferenceSystem getCrs(); @Api void setLayerInfo(VectorLayerInfo layerInfo); @Override VectorLayerInfo getLayerInfo(); @Override boolean isCreateCapable(); @Override boolean isUpdateCapable(); @Override boolean isDeleteCapable(); @Api void setUrl(String url); Iterator<?> getElements(Filter filter, int offset, int maxResultSize); @Override Envelope getBounds(); Envelope getBounds(Filter filter); @Override FeatureModel getFeatureModel(); @Override Object create(Object feature); @Override Object read(String featureId); @Override Object saveOrUpdate(Object feature); @Override void delete(String featureId);  }
@Test public void getBounds() throws Exception { Envelope bbox = layer.getBounds(); Assert.assertEquals(-175.22, bbox.getMinX(), .01); Assert.assertEquals(179.21, bbox.getMaxX(), .01); Assert.assertEquals(-41.29, bbox.getMinY(), .01); Assert.assertEquals(64.15, bbox.getMaxY(), .01); }
@Test public void getBoundsFilter() throws Exception { Envelope bbox = layer.getBounds(filter); Assert.assertEquals(-122.34, bbox.getMinX(), .01); Assert.assertEquals(151.18, bbox.getMaxX(), .01); Assert.assertEquals(-37.81, bbox.getMinY(), .01); Assert.assertEquals(55.75, bbox.getMaxY(), .01); }