### Question:
GatewayLoginProvider implements AuthenticationProvider { @Override public boolean supports(Class<?> auth) { return auth.equals(UsernamePasswordAuthenticationToken.class); }  @Override Authentication authenticate(Authentication authentication); @Override boolean supports(Class<?> auth);  }### Answer:
@Test public void shouldSupportUsernamePasswordAuthentication() { assertTrue(gatewayLoginProvider.supports(UsernamePasswordAuthenticationToken.class)); }
@Test public void shouldNotSupportGenericAuthentication() { assertFalse(gatewayLoginProvider.supports(Authentication.class)); assertFalse(gatewayLoginProvider.supports(TokenAuthentication.class)); }