### Question:
RegistryEntityDriverFactory implements EntityDriverManager { public boolean hasDriver(DriverDependentEntity<?> entity, Location location) { return lookupDriver(entity.getDriverInterface(), location) != null; }  @Override D build(DriverDependentEntity<D> entity, Location location); boolean hasDriver(DriverDependentEntity<?> entity, Location location); void registerDriver(Class<D> driverInterface, Class<? extends Location> locationClazz, Class<? extends D> driverClazz);  }### Answer:
@Test public void testHasDriver() throws Exception { DriverDependentEntity<MyDriver> entity = new MyDriverDependentEntity<MyDriver>(MyDriver.class); factory.registerDriver(MyDriver.class, SshMachineLocation.class, MyOtherSshDriver.class); assertTrue(factory.hasDriver(entity, sshLocation)); assertFalse(factory.hasDriver(entity, simulatedLocation)); }