private void assertClassForName(Class<?> c, int i) {
   PreferencesUtils.setString(getContext(), R.string.sensor_type_key, getContext().getString(i));
   SensorManager sm = SensorManagerFactory.getSystemSensorManager(getContext());
   assertNotNull(sm);
   assertTrue(c.isInstance(sm));
   SensorManagerFactory.releaseSystemSensorManager();
 }
 @SmallTest
 public void testDefaultSettings() throws Exception {
   assertNull(SensorManagerFactory.getSystemSensorManager(getContext()));
 }