assertTrue(result.isApproved());
}
@Test
public void testImplicitlyDeniedScope() {
AuthorizationRequest authorizationRequest = new AuthorizationRequest("client", Arrays.asList("read", "write"));
authorizationRequest.setApprovalParameters(Collections.singletonMap("scope.read", "approved"));
AuthorizationRequest result = handler.updateAfterApproval(authorizationRequest, userAuthentication);
assertTrue(handler.isApproved(result, userAuthentication));
Collection<Approval> approvals = store.getApprovals("user", "client");
assertEquals(2, approvals.size());
approvals.contains(new Approval("user", "client", "read", new Date(), Approval.ApprovalStatus.APPROVED));
approvals.contains(new Approval("user", "client", "write", new Date(), Approval.ApprovalStatus.DENIED));
assertEquals(1, result.getScope().size());
}