JwtAuthenticationProvider extends TimeMeasuringAuthenticationProvider<AuthenticationResult> { @Override public boolean isApplicable(final RequestContext requestContext) { return HttpUtils.containsAuthorizationForPrefix(requestContext, AUTHORIZATION_JWT); } private  JwtAuthenticationProvider(final JwtAuthenticationResultProvider jwtAuthenticationResultProvider,
            final JwtValidator jwtValidator); static JwtAuthenticationProvider newInstance(
            final JwtAuthenticationResultProvider jwtAuthenticationResultProvider, final JwtValidator jwtValidator); @Override boolean isApplicable(final RequestContext requestContext); @Override AuthorizationContextType getType(final RequestContext requestContext);  }
@Test public void isApplicable() { final RequestContext requestContext = mockRequestContext(VALID_AUTHORIZATION_HEADER); softly.assertThat(underTest.isApplicable(requestContext)).isTrue(); }
@Test public void isApplicableWithoutAuthorizationHeader() { final RequestContext requestContext = mockRequestContext(); softly.assertThat(underTest.isApplicable(requestContext)).isFalse(); }
@Test public void isApplicableWithInvalidAuthorizationHeader() { final RequestContext requestContext = mockRequestContext(INVALID_AUTHORIZATION_HEADER); softly.assertThat(underTest.isApplicable(requestContext)).isFalse(); }