}
@Test
public void testApprovalStoreAddsScopes() throws Exception {
ApprovalStoreUserApprovalHandler userApprovalHandler = new ApprovalStoreUserApprovalHandler();
userApprovalHandler.setApprovalStore(new InMemoryApprovalStore());
endpoint.setUserApprovalHandler(userApprovalHandler);
ModelAndView result = endpoint.authorize(model,
getAuthorizationRequest("foo", null, null, "read", Collections.singleton("code"))
.getRequestParameters(), sessionStatus, principal);
assertEquals("forward:/oauth/confirm_access", result.getViewName());