### Question:
ArcGISTileEnvoy extends XYZTileEnvoy { @Override public boolean providesDataFor(DataModelCategory category) { return super.providesDataFor(category) && category.getSource() != null && category.getSource().toLowerCase().contains("/rest/services"); } ArcGISTileEnvoy(Toolbox toolbox); @Override boolean providesDataFor(DataModelCategory category);  }### Answer:
@Test public void testProvidesDataFor() { EasyMockSupport support = new EasyMockSupport(); Toolbox toolbox = createToolbox(support, null); support.replayAll(); ArcGISTileEnvoy envoy = new ArcGISTileEnvoy(toolbox); DataModelCategory yes = new DataModelCategory("/rest/services", XYZTileUtils.TILES_FAMILY, "xyz"); DataModelCategory no = new DataModelCategory("something", XYZTileUtils.TILES_FAMILY, "xyz"); DataModelCategory no1 = new DataModelCategory(null, XYZTileUtils.TILES_FAMILY, "xyz"); assertTrue(envoy.providesDataFor(yes)); assertFalse(envoy.providesDataFor(no)); assertFalse(envoy.providesDataFor(no1)); support.verifyAll(); }