@Test public void testIsNotApplicableWithEmtpyPassword() { PlainMechanism mech = new PlainMechanism(); assertFalse("Should not be applicable with empty password", mech.isApplicable("user", "", null)); }
@Override public boolean isApplicable(String username, String password, Principal localPrincipal) { return username != null && username.length() > 0 && password != null && password.length() > 0; }
PlainMechanism extends AbstractMechanism { @Override public boolean isApplicable(String username, String password, Principal localPrincipal) { return username != null && username.length() > 0 && password != null && password.length() > 0; } }
PlainMechanism extends AbstractMechanism { @Override public boolean isApplicable(String username, String password, Principal localPrincipal) { return username != null && username.length() > 0 && password != null && password.length() > 0; }  }
PlainMechanism extends AbstractMechanism { @Override public boolean isApplicable(String username, String password, Principal localPrincipal) { return username != null && username.length() > 0 && password != null && password.length() > 0; }  @Override int getPriority(); @Override String getName(); @Override byte[] getInitialResponse(); @Override byte[] getChallengeResponse(byte[] challenge); @Override boolean isApplicable(String username, String password, Principal localPrincipal); }
PlainMechanism extends AbstractMechanism { @Override public boolean isApplicable(String username, String password, Principal localPrincipal) { return username != null && username.length() > 0 && password != null && password.length() > 0; }  @Override int getPriority(); @Override String getName(); @Override byte[] getInitialResponse(); @Override byte[] getChallengeResponse(byte[] challenge); @Override boolean isApplicable(String username, String password, Principal localPrincipal);  }