### Question:
JsonInputValidatorFactory { public static JsonInputValidator getValidator(Class<?> clazz) { if (clazz.equals(Scope.class)) { return ScopeValidator.getInstance(); } if (clazz.equals(ApplicationInfo.class)) { return ApplicationInfoValidator.getInstance(); } return null; }  static JsonInputValidator getValidator(Class<?> clazz);  }### Answer:
@Test public void when_application_info_class_return_application_info_validator() throws Exception { JsonInputValidator validator = JsonInputValidatorFactory.getValidator(ApplicationInfo.class); assertTrue(validator instanceof ApplicationInfoValidator); }
@Test public void when_scope_class_return_scope_validator() throws Exception { JsonInputValidator validator = JsonInputValidatorFactory.getValidator(Scope.class); assertTrue(validator instanceof ScopeValidator); }