@Test
public void testPasswordRemoved() {
ResourceOwnerPasswordTokenGranter granter = new ResourceOwnerPasswordTokenGranter(authenticationManager,
providerTokenServices, clientDetailsService, requestFactory);
OAuth2AccessToken token = granter.grant("password", tokenRequest);
OAuth2Authentication authentication = providerTokenServices.loadAuthentication(token.getValue());
assertNotNull(authentication.getOAuth2Request().getRequestParameters().get("username"));
assertNull(authentication.getOAuth2Request().getRequestParameters().get("password"));
}