@Test(description = "Testing if the device is enrolled when the device is enrolled.")
public void testIsEnrolledWhenDeviceIsEnrolled() throws DeviceManagementException {

    PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService"))
            .toReturn(this.deviceManagementProviderService);
    Mockito.when(this.deviceManagementProviderService.isEnrolled(Mockito.any(DeviceIdentifier.class)))
            .thenReturn(true);
    Response response = this.deviceManagementService.isEnrolled(TEST_DEVICE_TYPE, UUID.randomUUID().toString());
    Assert.assertNotNull(response);
    Assert.assertEquals(response.getStatus(), Response.Status.OK.getStatusCode());
    Mockito.reset(this.deviceManagementProviderService);
}