### Question:
ArcGISLayerListEnvoy extends AbstractEnvoy implements DataRegistryDataProvider { protected String removeServerComponent(String subpath) { String returnValue = subpath; Matcher serverMatcher = SERVER_SUBPATH_PATTERN.matcher(subpath); if (serverMatcher.matches()) { returnValue = subpath.replace("/" + serverMatcher.group(1) + serverMatcher.group(2), ""); } return returnValue; } ArcGISLayerListEnvoy(Toolbox toolbox); @Override Collection<? extends Satisfaction> getSatisfaction(DataModelCategory dataModelCategory,
            Collection<? extends IntervalPropertyValueSet> intervalSets); @Override String getThreadPoolName(); @Override void open(); @Override boolean providesDataFor(DataModelCategory category); @Override void query(DataModelCategory category, Collection<? extends Satisfaction> satisfactions,
            List<? extends PropertyMatcher<?>> parameters, List<? extends OrderSpecifier> orderSpecifiers, int limit,
            Collection<? extends PropertyDescriptor<?>> propertyDescriptors, final CacheDepositReceiver queryReceiver);  }### Answer:
@Test public void removeServerComponent() throws IOException, URISyntaxException { EasyMockSupport support = new EasyMockSupport(); Toolbox toolbox = createToolbox(support, "/testLayers.json"); support.replayAll(); ArcGISLayerListEnvoy envoy = new ArcGISLayerListEnvoy(toolbox); String result = envoy.removeServerComponent("foo/bar/FeatureServer"); assertEquals("foo/bar", result); }