@Test public void shouldReturnFalseIfAuthenticationNotOfTypeUsernamePasswordAuthenticationToken() throws Exception { boolean supported = restApiAuthenticationProvider.supports(Authentication.class); assertFalse(supported); }
@Override public boolean supports(Class<?> authentication) { return (UsernamePasswordAuthenticationToken.class.isAssignableFrom(authentication)); }
RestApiAuthenticationProvider implements AuthenticationProvider { @Override public boolean supports(Class<?> authentication) { return (UsernamePasswordAuthenticationToken.class.isAssignableFrom(authentication)); } }
RestApiAuthenticationProvider implements AuthenticationProvider { @Override public boolean supports(Class<?> authentication) { return (UsernamePasswordAuthenticationToken.class.isAssignableFrom(authentication)); }  }
RestApiAuthenticationProvider implements AuthenticationProvider { @Override public boolean supports(Class<?> authentication) { return (UsernamePasswordAuthenticationToken.class.isAssignableFrom(authentication)); }  @Override Authentication authenticate(Authentication authentication); @Override boolean supports(Class<?> authentication); }
RestApiAuthenticationProvider implements AuthenticationProvider { @Override public boolean supports(Class<?> authentication) { return (UsernamePasswordAuthenticationToken.class.isAssignableFrom(authentication)); }  @Override Authentication authenticate(Authentication authentication); @Override boolean supports(Class<?> authentication);  }