### Question:
ValidatorFactory { static void registerValidator(Class<? extends Validator> clazz) { boolean deprecated = clazz.getAnnotation(Deprecated.class) == null ? false : true; if (deprecated) { LOG.warn(clazz.getName() + " is deprecated"); } validators.put(clazz.getSimpleName().replace("Validator", ""), createValidator(clazz)); }  static List<ValidatorConfiguration> getConfigurations(String lang); static Validator getInstance(String validatorName); static Validator getInstance(ValidatorConfiguration config, Configuration globalConfig);  }### Answer:
@Test void registerDeprecatedValidator() { ValidatorFactory.registerValidator(SpaceBeginningOfSentenceValidator.class); assertNotNull(ValidatorFactory.validators.get("SpaceBeginningOfSentence")); }
@Test void noDefaultConstructor() { assertThrows(RuntimeException.class, ()-> { ValidatorFactory.registerValidator(NoDefaultConstructorValidator.class); }); }