shadows/framework/src/main/java/org/robolectric/shadows/ShadowSensor.java
public static Sensor newInstance(int type) {
    Sensor sensor = Shadow.newInstanceOf(Sensor.class);
    reflector(_Sensor_.class, sensor).setTypeCompat(type);
    return sensor;
  }
public static Sensor newInstance(int type) {
    Sensor sensor = Shadow.newInstanceOf(Sensor.class);
    reflector(_Sensor_.class, sensor).setTypeCompat(type);
    return sensor;
  }
Constructs a {@link Sensor} with a given type.