@Test(expected = ParameterException.class) public void missingUsernameFails() { new BasicAuthParameterValidator().validate(null, ":pass"); }
public void validate(String name, String value) throws ParameterException { if (!pattern.matcher(value).matches()) { throw new ParameterException("Expected format: username:password"); } }
BasicAuthParameterValidator implements IParameterValidator { public void validate(String name, String value) throws ParameterException { if (!pattern.matcher(value).matches()) { throw new ParameterException("Expected format: username:password"); } } }
BasicAuthParameterValidator implements IParameterValidator { public void validate(String name, String value) throws ParameterException { if (!pattern.matcher(value).matches()) { throw new ParameterException("Expected format: username:password"); } }  }
BasicAuthParameterValidator implements IParameterValidator { public void validate(String name, String value) throws ParameterException { if (!pattern.matcher(value).matches()) { throw new ParameterException("Expected format: username:password"); } }  void validate(String name, String value); }
BasicAuthParameterValidator implements IParameterValidator { public void validate(String name, String value) throws ParameterException { if (!pattern.matcher(value).matches()) { throw new ParameterException("Expected format: username:password"); } }  void validate(String name, String value);  }