use of org.forgerock.oauth2.core.ResourceOwner in project OpenAM by OpenRock.
the class UmaPolicyServiceImplDelegationTest method registerResourceSet.
private String registerResourceSet(String resourceOwner) throws Exception {
setupIdentityForUser(resourceOwner, loggedInRealm);
String resourceSetId = UUID.randomUUID().toString();
ResourceSetDescription resourceSet = new ResourceSetDescription(resourceSetId, "CLIENT_ID", resourceOwner, json(object(field("name", "RESOURCE_SET_NAME"), field("scopes", array("SCOPE_A", "SCOPE_B")))).asMap());
given(resourceSetStore.read(resourceSetId, resourceOwner)).willReturn(resourceSet);
given(resourceSetStore.query(QueryFilter.and(QueryFilter.equalTo(ResourceSetTokenField.RESOURCE_SET_ID, resourceSetId)))).willReturn(Collections.singleton(resourceSet));
return resourceSetId;
}
Aggregations