### Question:
ProxyConfigAuthValidator implements ConstraintValidator<ValidProxyConfigAuthRequest, ProxyRequest> { @Override public boolean isValid(ProxyRequest proxyRequest, ConstraintValidatorContext constraintValidatorContext) { String user = proxyRequest.getUserName(); String password = proxyRequest.getPassword(); return StringUtils.isAllEmpty(user, password) || StringUtils.isNoneBlank(user, password); }  @Override boolean isValid(ProxyRequest proxyRequest, ConstraintValidatorContext constraintValidatorContext);  }### Answer:
@Test public void testValidProxyConfigWithoutAuth() { ProxyRequest proxyRequest = new ProxyRequest(); Assert.assertTrue(underTest.isValid(proxyRequest, null)); }
@Test public void testValidProxyConfigWithAuth() { ProxyRequest proxyRequest = new ProxyRequest(); proxyRequest.setUserName("user"); proxyRequest.setPassword("pwd"); Assert.assertTrue(underTest.isValid(proxyRequest, null)); }