@Test(description = "This method tests  getting details of an activity for a given device")
public void testGetActivitiesByDevice() throws OperationManagementException {

    PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService"))
            .toReturn(this.deviceManagementProviderService);
    Mockito.when(this.deviceManagementProviderService
            .getOperationByActivityIdAndDevice(TEST_ACTIVITY_ID, deviceIdentifier)).thenReturn(activity);
    Response response = this.activityInfoProviderService.getActivityByDevice(TEST_ACTIVITY_ID,
            DEVICE_TYPE, DEVICE_ID, IF_MODIFIED_SINCE);
    Assert.assertNotNull(response);
    Assert.assertEquals(response.getStatus(), Response.Status.OK.getStatusCode());
    Mockito.reset(this.deviceManagementProviderService);
}