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

    PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getGroupManagementProviderService"))
            .toReturn(groupManagementProviderService);
    Mockito.doReturn(new DeviceGroup()).when(groupManagementProviderService).getGroup(1);
    Mockito.doReturn(null).when(groupManagementProviderService).getGroup(2);
    Mockito.doThrow(new GroupManagementException()).when(groupManagementProviderService).getGroup(3);
    Response response = groupManagementService.getGroup(1);
    Assert.assertEquals(response.getStatus(), Response.Status.OK.getStatusCode(),
            "getGroup request failed for a request with valid parameters");
    response = groupManagementService.getGroup(2);
    Assert.assertEquals(response.getStatus(), Response.Status.NOT_FOUND.getStatusCode(),
            "getGroup request returned a group for a non-existing group");
    response = groupManagementService.getGroup(3);
    Assert.assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(),
            "getGroup request returned a group for a in-valid request");
}