@Test @SuppressLint("HardwareIds") public void testNullDeviceIdKit() throws NameNotFoundException {
		final CondomContext condom = CondomContext.wrap(new ContextWrapper(context), "NullDeviceId",
				new CondomOptions().addKit(new NullDeviceIdKit()));
		final TelephonyManager tm = (TelephonyManager) condom.getSystemService(Context.TELEPHONY_SERVICE);
		assertNotNull(tm);
		assertTrue(tm.getClass().getName().startsWith(NullDeviceIdKit.class.getName()));
		final TelephonyManager app_tm = (TelephonyManager) condom.getApplicationContext().getSystemService(Context.TELEPHONY_SERVICE);
		assertNotNull(app_tm);
		assertTrue(app_tm.getClass().getName().startsWith(NullDeviceIdKit.class.getName()));

		assertPermission(condom, READ_PHONE_STATE, true);

		assertNull(tm.getDeviceId());
		if (SDK_INT >= LOLLIPOP) {
			if (SDK_INT >= M) assertNull(tm.getDeviceId(0));
			assertNull(tm.getImei());
			assertNull(tm.getImei(0));
			if (SDK_INT >= O) assertNull(tm.getMeid());
			if (SDK_INT >= O) assertNull(tm.getMeid(0));
		}
		assertNull(tm.getSimSerialNumber());
		assertNull(tm.getLine1Number());
		assertNull(tm.getSubscriberId());
	}
Test cases for {@link CondomKit}

Created by Oasis on 2017/7/22.
library/src/androidTest/java/com/oasisfeng/condom/CondomKitTest.java