private OAuth2Authentication authentication = new OAuth2Authentication(request, user);
@Before
public void init() throws Exception {
tokenServices.setClientDetailsService(new InMemoryClientDetailsServiceBuilder().withClient("client")
.authorizedGrantTypes("authorization_code").scopes("read").secret("secret").and().build());
enhancer.setTokenEnhancers(Arrays.<TokenEnhancer> asList(jwtTokenEnhancer));
jwtTokenEnhancer.afterPropertiesSet();
tokenServices.setTokenStore(new JwtTokenStore(jwtTokenEnhancer));
tokenServices.setTokenEnhancer(enhancer);