@Test public void testIsApplicableWithPrincipalOnly() { ExternalMechanism mech = new ExternalMechanism(); assertTrue("Should be applicable with principal only", mech.isApplicable(null, null, new Principal() { @Override public String getName() { return "name"; } })); }
@Override public boolean isApplicable(String username, String password, Principal localPrincipal) { return localPrincipal != null; }
ExternalMechanism extends AbstractMechanism { @Override public boolean isApplicable(String username, String password, Principal localPrincipal) { return localPrincipal != null; } }
ExternalMechanism extends AbstractMechanism { @Override public boolean isApplicable(String username, String password, Principal localPrincipal) { return localPrincipal != null; }  }
ExternalMechanism extends AbstractMechanism { @Override public boolean isApplicable(String username, String password, Principal localPrincipal) { return localPrincipal != null; }  @Override byte[] getInitialResponse(); @Override byte[] getChallengeResponse(byte[] challenge); @Override int getPriority(); @Override String getName(); @Override boolean isApplicable(String username, String password, Principal localPrincipal); }
ExternalMechanism extends AbstractMechanism { @Override public boolean isApplicable(String username, String password, Principal localPrincipal) { return localPrincipal != null; }  @Override byte[] getInitialResponse(); @Override byte[] getChallengeResponse(byte[] challenge); @Override int getPriority(); @Override String getName(); @Override boolean isApplicable(String username, String password, Principal localPrincipal);  }