### Question:
GeoPackageImageEnvoy extends AbstractEnvoy implements DataRegistryDataProvider { @Override public boolean providesDataFor(DataModelCategory category) { return myGeoPackage.getPath().equals(category.getSource()) && StringUtils.isNotEmpty(category.getFamily()) && Image.class.getName().equals(category.getCategory()); } GeoPackageImageEnvoy(Toolbox toolbox, GeoPackage geoPackage); @Override void close(); @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, CacheDepositReceiver queryReceiver);  }### Answer:
@Test public void testProvidesDataFor() { EasyMockSupport support = new EasyMockSupport(); Toolbox toolbox = support.createMock(Toolbox.class); GeoPackage geopackage = support.createMock(GeoPackage.class); EasyMock.expect(geopackage.getPath()).andReturn(ourPackageFile).atLeastOnce(); support.replayAll(); GeoPackageImageEnvoy envoy = new GeoPackageImageEnvoy(toolbox, geopackage); DataModelCategory yes = new DataModelCategory(ourPackageFile, ourTileLayerName, Image.class.getName()); DataModelCategory no = new DataModelCategory(ourPackageFile, null, Image.class.getName()); DataModelCategory no1 = new DataModelCategory("something else", ourTileLayerName, Image.class.getName()); DataModelCategory no2 = new DataModelCategory(ourPackageFile, ourTileLayerName, GeoPackageTile.class.getName()); DataModelCategory no3 = new DataModelCategory(null, ourTileLayerName, Image.class.getName()); DataModelCategory no4 = new DataModelCategory(ourPackageFile, ourTileLayerName, null); assertTrue(envoy.providesDataFor(yes)); assertFalse(envoy.providesDataFor(no)); assertFalse(envoy.providesDataFor(no1)); assertFalse(envoy.providesDataFor(no2)); assertFalse(envoy.providesDataFor(no3)); assertFalse(envoy.providesDataFor(no4)); support.verifyAll(); }