@Test(description = "This method tests the behaviour of getGroups method under negative circumstances",
        dependsOnMethods = {"testGetGroups"})

public void testGetGroupUnderNegativeConditions() throws GroupManagementException {
    PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getGroupManagementProviderService"))
            .toReturn(groupManagementProviderService);
    PowerMockito.stub(PowerMockito.method(PrivilegedCarbonContext.class, "getThreadLocalCarbonContext"))
            .toReturn(context);
    Mockito.reset(groupManagementProviderService);
    Mockito.doThrow(new GroupManagementException()).when(groupManagementProviderService)
            .getGroups(Mockito.anyString(), Mockito.any(GroupPaginationRequest.class));
    Response response = groupManagementService.getGroups("test", "admin", 0, 10);
    Assert.assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(),
            "GetGroups request succeeded with in-valid parameters");
}