### Question:
OSMTileEnvoy extends XYZTileEnvoy { @Override public boolean providesDataFor(DataModelCategory category) { return super.providesDataFor(category) && OSMUtil.PROVIDER.equals(category.getCategory()); } OSMTileEnvoy(Toolbox toolbox); @Override boolean providesDataFor(DataModelCategory category);  }### Answer:
@Test public void testProvidesDataFor() { EasyMockSupport support = new EasyMockSupport(); Toolbox toolbox = support.createMock(Toolbox.class); support.replayAll(); OSMTileEnvoy envoy = new OSMTileEnvoy(toolbox); DataModelCategory provides = new DataModelCategory(ourServer, XYZTileUtils.TILES_FAMILY, ourLayer); DataModelCategory notProvides = new DataModelCategory(ourServer, Image.class.getName(), ourLayer); DataModelCategory notProvides2 = new DataModelCategory(null, XYZTileUtils.TILES_FAMILY, ourLayer); DataModelCategory notProvides3 = new DataModelCategory(ourServer, XYZTileUtils.TILES_FAMILY, null); DataModelCategory notProvides4 = new DataModelCategory(ourServer, null, ourLayer); DataModelCategory notProvides5 = new DataModelCategory(ourServer, XYZTileUtils.TILES_FAMILY, "Open Street Map"); assertTrue(envoy.providesDataFor(provides)); assertFalse(envoy.providesDataFor(notProvides)); assertFalse(envoy.providesDataFor(notProvides2)); assertFalse(envoy.providesDataFor(notProvides3)); assertFalse(envoy.providesDataFor(notProvides4)); assertFalse(envoy.providesDataFor(notProvides5)); support.verifyAll(); }