### Question:
AuthenticationUtils { public static String getJwtTokenFromAuthorizationHeaderValue(final String value) { if (value != null) { final String bearerSchemaName = "Bearer "; if (value.startsWith(bearerSchemaName)) { return value.substring(bearerSchemaName.length()); } } return null; }  @VisibleForTesting static boolean isPermitted(
      final Optional<AuthenticationService> authenticationService,
      final Optional<User> optionalUser,
      final JsonRpcMethod jsonRpcMethod); static void getUser(
      final Optional<AuthenticationService> authenticationService,
      final String token,
      final Handler<Optional<User>> handler); static String getJwtTokenFromAuthorizationHeaderValue(final String value);  }### Answer:
@Test public void getJwtTokenFromNullStringShouldReturnNull() { final String headerValue = null; final String token = AuthenticationUtils.getJwtTokenFromAuthorizationHeaderValue(headerValue); assertThat(token).isNull(); }
@Test public void getJwtTokenFromEmptyStringShouldReturnNull() { final String headerValue = ""; final String token = AuthenticationUtils.getJwtTokenFromAuthorizationHeaderValue(headerValue); assertThat(token).isNull(); }
@Test public void getJwtTokenFromInvalidAuthorizationHeaderValueShouldReturnNull() { final String headerValue = "Foo eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9"; final String token = AuthenticationUtils.getJwtTokenFromAuthorizationHeaderValue(headerValue); assertThat(token).isNull(); }
@Test public void getJwtTokenFromValidAuthorizationHeaderValueShouldReturnToken() { final String headerValue = "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9"; final String token = AuthenticationUtils.getJwtTokenFromAuthorizationHeaderValue(headerValue); assertThat(token).isEqualTo("eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9"); }