@Test(description = "Testing getting operation list of a device when unable to retrieve operations")
public void testGetDeviceOperationsException() throws OperationManagementException {

    PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService"))
            .toReturn(this.deviceManagementProviderService);
    Mockito.when(this.deviceManagementProviderService.getOperations(Mockito.any(DeviceIdentifier.class),
            Mockito.any(PaginationRequest.class))).thenThrow(new OperationManagementException());
    Response response = this.deviceManagementService
            .getDeviceOperations(TEST_DEVICE_TYPE, UUID.randomUUID().toString(), "", 10, 5, DEFAULT_USERNAME);
    Assert.assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(),
            "Expects to return HTTP 500 when an exception occurred while retrieving operation list of the device");
}