@Test(description = "This test case tests IsEnrolled method of the DeviceTypeManager",
        dependsOnMethods = {"testEnrollDevice"})

public void testIsEnrolled() throws DeviceManagementException {
    DeviceIdentifier deviceIdentifier = new DeviceIdentifier(sampleDevice2.getDeviceIdentifier(),
            sampleDevice2.getType());
    DeviceIdentifier nonExistingCustomDeviceIdentifier = new DeviceIdentifier(sampleDevice2.getDeviceIdentifier(),
            customDevice.getType());
    Assert.assertFalse(androidDeviceTypeManager.isEnrolled(nonExistingDeviceIdentifier),
            "Device with NON-Existing ID is not enrolled, but this shows as enrolled");
    Assert.assertTrue(androidDeviceTypeManager.isEnrolled(deviceIdentifier),
            "Enrolled device is shown as un-enrolled");
    Assert.assertFalse(customDeviceTypeManager.isEnrolled(nonExistingCustomDeviceIdentifier),
            "Custom device type manager returns an non-existing device as enrolled");
    Assert.assertTrue(customDeviceTypeManager.isEnrolled(new DeviceIdentifier(customDeviceType, customDeviceType))
            , "Enrolled device is shown as un-enrolled in custom device type manager");
}