### Question:
GatewayTokenProvider implements AuthenticationProvider { @Override public boolean supports(Class<?> authentication) { return TokenAuthentication.class.isAssignableFrom(authentication); }  @Override Authentication authenticate(Authentication authentication); @Override boolean supports(Class<?> authentication);  }### Answer:
@Test public void shouldSupportTokenAuthentication() { assertTrue(gatewayTokenProvider.supports(TokenAuthentication.class)); }
@Test public void shouldNotSupportGenericAuthentication() { assertFalse(gatewayTokenProvider.supports(Authentication.class)); }