### Question:
CustomAuthenticatorConfig implements AuthenticationConfig { @Override public AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap) { final ClassLoader classLoader = getClassLoader(classPath); final Class<?> klass = loadClass(classLoader, className); final Class<AuthenticationConfig> authConfigClass = toAuthConfigClass(klass); final AuthenticationConfig loadedConfig = loadAuthenticationConfig(properties, authConfigClass); return loadedConfig.createAuthFilter(bootstrap); } CustomAuthenticatorConfig(String className);  CustomAuthenticatorConfig(String className, JsonNode properties); @JsonCreator  CustomAuthenticatorConfig(
            @JsonProperty("className") String className,
            @JsonProperty("classPath") Optional<String> classPath,
            @JsonProperty("properties") Optional<JsonNode> properties); @Override AuthFilter<?, Principal> createAuthFilter(AuthenticationBootstrap bootstrap);  }### Answer:
@Test(expected = NullPointerException.class) public void testCreateAuthFilterThrowsIfClassNameIsNull() { final CustomAuthenticatorConfig config = new CustomAuthenticatorConfig(null); config.createAuthFilter(createTypicalAuthBootstrap()); }
@Test(expected = RuntimeException.class) public void testCreateAuthFilterIfClassNameDoesNotExistOnClassPath() { final CustomAuthenticatorConfig config = new CustomAuthenticatorConfig(generateClassName()); config.createAuthFilter(createTypicalAuthBootstrap()); }
@Test(expected = RuntimeException.class) public void testCreateAuthFilterIfClassDoesNotDeriveFromAuthenticationConfig() { final CustomAuthenticatorConfig config = new CustomAuthenticatorConfig(Object.class.getName()); config.createAuthFilter(createTypicalAuthBootstrap()); }
@Test public void testCreateAuthFilterDoesNotThrowIfClassDoesDeriveFromAuthenticationConfig() { final CustomAuthenticatorConfig config = new CustomAuthenticatorConfig(NullCustomAuthConfig.class.getName()); config.createAuthFilter(createTypicalAuthBootstrap()); }