### Question:
AuthenticationJsonWebToken implements Authentication, JwtAuthentication { @Override public Object getCredentials() { return decoded.getToken(); } AuthenticationJsonWebToken(String token, JWTVerifier verifier); @Override String getToken(); @Override String getKeyId(); @Override Authentication verify(JWTVerifier verifier); @Override Collection<? extends GrantedAuthority> getAuthorities(); @Override Object getCredentials(); @Override Object getDetails(); @Override Object getPrincipal(); @Override boolean isAuthenticated(); @Override void setAuthenticated(boolean isAuthenticated); @Override String getName();  }### Answer:
@Test public void shouldGetStringTokenAsCredentials() throws Exception { String token = JWT.create() .withIssuer("auth0") .sign(hmacAlgorithm); AuthenticationJsonWebToken auth = new AuthenticationJsonWebToken(token, verifier); assertThat(auth, is(notNullValue())); assertThat(auth.getCredentials(), is(notNullValue())); assertThat(auth.getCredentials(), is(instanceOf(String.class))); assertThat(auth.getCredentials(), Matchers.<Object>is(token)); }