use of org.apereo.portal.groups.pags.dao.jpa.PersonAttributesGroupDefinitionImpl in project uPortal by Jasig.
the class PagsRESTControllerTest method testFindPagsGroup.
@Test
public void testFindPagsGroup() throws JsonProcessingException {
String groupName = "groupname";
IPerson person = new PersonImpl();
person.setUserName(USER_NAME);
person.setFullName("john doe");
Mockito.when(personManager.getPerson(req)).thenReturn(person);
IPersonAttributesGroupDefinition pagsGroup = new PersonAttributesGroupDefinitionImpl(groupName, "this is awesome");
Mockito.when(pagsService.getPagsDefinitionByName(person, groupName)).thenReturn(pagsGroup);
pagsRESTController.findPagsGroup(req, res, "groupname");
Mockito.verify(mapper).writeValueAsString(pagsGroup);
}
Aggregations