@Test void authenticate() { CertificateAuthenticationProvider cap = new CertificateAuthenticationProvider(); Authentication authentication = mock(Authentication.class); cap.authenticate(authentication); verify(authentication, times(1)).setAuthenticated(true); }
@Override public Authentication authenticate(Authentication authentication) { authentication.setAuthenticated(true); return authentication; }
CertificateAuthenticationProvider implements AuthenticationProvider { @Override public Authentication authenticate(Authentication authentication) { authentication.setAuthenticated(true); return authentication; } }
CertificateAuthenticationProvider implements AuthenticationProvider { @Override public Authentication authenticate(Authentication authentication) { authentication.setAuthenticated(true); return authentication; }  }
CertificateAuthenticationProvider implements AuthenticationProvider { @Override public Authentication authenticate(Authentication authentication) { authentication.setAuthenticated(true); return authentication; }  @Override Authentication authenticate(Authentication authentication); @Override boolean supports(Class<?> authentication); }
CertificateAuthenticationProvider implements AuthenticationProvider { @Override public Authentication authenticate(Authentication authentication) { authentication.setAuthenticated(true); return authentication; }  @Override Authentication authenticate(Authentication authentication); @Override boolean supports(Class<?> authentication);  }