### Question:
SpringSecurityContext { @Nullable public static Token getToken() { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); if (Objects.nonNull(authentication) && authentication.isAuthenticated() && authentication.getDetails() instanceof OAuth2AuthenticationDetails) { OAuth2AuthenticationDetails authDetails = (OAuth2AuthenticationDetails) authentication.getDetails(); String tokenValue = authDetails.getTokenValue(); return new XsuaaTokenWithGrantedAuthorities(tokenValue, authentication.getAuthorities()); } return null; } private  SpringSecurityContext(); @Nullable static Token getToken(); @Nullable static AccessToken getAccessToken(); static void clear();  }### Answer:
@Test public void getToken() { setToken(sapIdToken, NO_SCOPES); assertThat(SpringSecurityContext.getToken()).isEqualTo(sapIdToken); }
@Test public void tokenNotAvailableInDifferentThread() throws ExecutionException, InterruptedException { setToken(token, NO_SCOPES); Future<Token> tokenInOtherThread = executorService.submit(() -> SpringSecurityContext.getToken()); assertThat(tokenInOtherThread.get()).isNull(); }