### Question:
TileSetEnvoy extends AbstractEnvoy implements DataRegistryDataProvider { @Override public boolean providesDataFor(DataModelCategory category) { boolean isServer = category.getSource() == null || myServerUrl.equals(category.getSource()); return isServer && TileSet.class.getName().equals(category.getFamily()); } TileSetEnvoy(Toolbox toolbox, DefaultValidatorSupport validatorSupport, String serverUrl); @Override Collection<? extends Satisfaction> getSatisfaction(DataModelCategory dataModelCategory,
            Collection<? extends IntervalPropertyValueSet> intervalSets); @Override String getThreadPoolName(); DefaultValidatorSupport getValidatorSupport(); @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, CacheDepositReceiver queryReceiver);  }### Answer:
@Test public void testProvidesDataFor() { EasyMockSupport support = new EasyMockSupport(); Toolbox toolbox = support.createMock(Toolbox.class); DefaultValidatorSupport validatorSupport = new DefaultValidatorSupport(null); support.replayAll(); TileSetEnvoy envoy = new TileSetEnvoy(toolbox, validatorSupport, ourTestServer); DataModelCategory category = new DataModelCategory(null, TileSet.class.getName(), null); DataModelCategory noProvidy = new DataModelCategory(null, null, null); DataModelCategory provides = new DataModelCategory(ourTestServer, TileSet.class.getName(), null); DataModelCategory noProvides = new DataModelCategory("http: assertTrue(envoy.providesDataFor(category)); assertFalse(envoy.providesDataFor(noProvidy)); assertTrue(envoy.providesDataFor(provides)); assertFalse(envoy.providesDataFor(noProvides)); support.verifyAll(); }