@Test
public void removeGroupRoleTest() {

    Response response = target().path("groups/testGroup/roles").queryParam("role", "testRole")
            .request().delete();
    assertEquals(response.getStatus(), 200);
    verify(engineManager).retrieveGroup("testGroup");
    ArgumentCaptor<Group> captor = ArgumentCaptor.forClass(Group.class);
    verify(engineManager).updateGroup(captor.capture());
    Group updatedGroup = captor.getValue();
    assertEquals(group.getResource(), updatedGroup.getResource());
    assertEquals(0, updatedGroup.getHasGroupRole_resource().size());
}