### Question:
OSMServerSourceController extends UrlServerSourceController { @Override protected void handleDeactivateSource(IDataSource source) { DataModelCategory category = XYZTileUtils.newLayersCategory(((UrlDataSource)source).getURL(), OSMUtil.PROVIDER); getToolbox().getDataRegistry().removeModels(category, false); }  @Override IDataSource createNewSource(String typeName);  }### Answer:
@Test public void testHandleDeactivateSource() { EasyMockSupport support = new EasyMockSupport(); DataRegistry registry = support.createMock(DataRegistry.class); Toolbox toolbox = createToolbox(support, registry); EasyMock.expect(toolbox.getDataRegistry()).andReturn(registry); EasyMock.expect(registry.removeModels(EasyMock.eq(XYZTileUtils.newLayersCategory(OUR_SERVER, OSMUtil.PROVIDER)), EasyMock.eq(false))).andReturn(new long[] {}); support.replayAll(); OSMServerSourceController controller = new OSMServerSourceController(); controller.open(toolbox, OSMPlugin.class); UrlDataSource source = new UrlDataSource("Open Street Map", OUR_SERVER); controller.handleDeactivateSource(source); support.verifyAll(); }