// setup a catalog filter that will hide the layer
// an example of this happening is when the LocalWorkspaceCatalogFilter
// detects 'LocalLayer.get' contains the local layer
// the result is it gets filtered out
filter.setCatalogFilters(Collections.singletonList(new AbstractCatalogFilter() {
@Override
public boolean hideLayer(LayerInfo layer) {
return layer != statesLayer;
}