@Test(description = "This method tests the functionality of deleteGroup method under various scenarios")
public void testDeleteGroup() throws GroupManagementException {

    PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getGroupManagementProviderService"))
            .toReturn(groupManagementProviderService);
    Mockito.doReturn(true).when(groupManagementProviderService).deleteGroup(1);
    Mockito.doReturn(false).when(groupManagementProviderService).deleteGroup(2);
    Mockito.doThrow(new GroupManagementException()).when(groupManagementProviderService).deleteGroup(3);
    Response response = groupManagementService.deleteGroup(1);
    Assert.assertEquals(response.getStatus(), Response.Status.OK.getStatusCode(),
            "delete group request failed for a request with valid parameters");
    response = groupManagementService.deleteGroup(2);
    Assert.assertEquals(response.getStatus(), Response.Status.NOT_FOUND.getStatusCode(),
            "Non-existing group was successfully deleted");
    response = groupManagementService.deleteGroup(3);
    Assert.assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(),
            "Deletion succeeded with an erroneous condition.");
}