@Test(description = "This method tests the functionality of getGroupRoles under various conditions")
public void testGetGroupRoles() throws GroupManagementException {

    PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getGroupManagementProviderService"))
            .toReturn(groupManagementProviderService);
    Mockito.doReturn(new ArrayList<String>()).when(groupManagementProviderService).getRoles(1);
    Mockito.doReturn(null).when(groupManagementProviderService).getRoles(2);
    Mockito.doThrow(new GroupManagementException()).when(groupManagementProviderService).getRoles(3);
    Response response = groupManagementService.getRolesOfGroup(1);
    Assert.assertEquals(response.getStatus(), Response.Status.OK.getStatusCode(),
            "getRolesOfGroup request failed for a request with valid parameters");
    response = groupManagementService.getRolesOfGroup(2);
    Assert.assertEquals(response.getStatus(), Response.Status.OK.getStatusCode(),
            "getRolesOfGroup request failed for a request with valid parameters");
    response = groupManagementService.getRolesOfGroup(3);
    Assert.assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(),
            "getRolesOfGroup request failed for a request with in-valid parameters");
}