### Question:
ReflectiveEntityDriverFactory { public DriverInferenceRule addClassSimpleNameMapping(String expectedClassSimpleName, String newClassSimpleName) { DriverInferenceByRenamingClassSimpleName rule = new DriverInferenceByRenamingClassSimpleName(expectedClassSimpleName, newClassSimpleName); return addRule(rule.getIdentifier(), rule); } ReflectiveEntityDriverFactory(); DriverInferenceRule addRule(String identifier, DriverInferenceRule rule); DriverInferenceRule addClassFullNameMapping(String expectedClassFullName, String newClassFullName); DriverInferenceRule addClassSimpleNameMapping(String expectedClassSimpleName, String newClassSimpleName); D build(DriverDependentEntity<D> entity, Location location);  }### Answer:
@Test public void testSimpleNameMapping() throws Exception { factory.addClassSimpleNameMapping(MyDriver.class.getSimpleName(), MyCustomDriver.class.getSimpleName()); assertDriverIs(MyCustomDriver.class, sshLocation); }
@Test public void testSimpleNameMappingFailure() throws Exception { factory.addClassSimpleNameMapping(MyDriver.class.getSimpleName()+"X", MyCustomDriver.class.getSimpleName()); assertDriverIs(MySshDriver.class, sshLocation); }