@Test(expected = IllegalArgumentException.class) public void testSetInvalidTiltSensitivity() throws Exception { SensorInterpreter sensorInterpreter = new SensorInterpreter(); sensorInterpreter.setTiltSensitivity(0); }
public void setTiltSensitivity(float tiltSensitivity) { if (tiltSensitivity <= 0) { throw new IllegalArgumentException("Tilt sensitivity must be positive"); } mTiltSensitivity = tiltSensitivity; }
SensorInterpreter { public void setTiltSensitivity(float tiltSensitivity) { if (tiltSensitivity <= 0) { throw new IllegalArgumentException("Tilt sensitivity must be positive"); } mTiltSensitivity = tiltSensitivity; } }
SensorInterpreter { public void setTiltSensitivity(float tiltSensitivity) { if (tiltSensitivity <= 0) { throw new IllegalArgumentException("Tilt sensitivity must be positive"); } mTiltSensitivity = tiltSensitivity; }  }
SensorInterpreter { public void setTiltSensitivity(float tiltSensitivity) { if (tiltSensitivity <= 0) { throw new IllegalArgumentException("Tilt sensitivity must be positive"); } mTiltSensitivity = tiltSensitivity; }  @SuppressWarnings("SuspiciousNameCombination") float[] interpretSensorEvent(@NonNull Context context, @Nullable SensorEvent event); void reset(); float getTiltSensitivity(); void setTiltSensitivity(float tiltSensitivity); }
SensorInterpreter { public void setTiltSensitivity(float tiltSensitivity) { if (tiltSensitivity <= 0) { throw new IllegalArgumentException("Tilt sensitivity must be positive"); } mTiltSensitivity = tiltSensitivity; }  @SuppressWarnings("SuspiciousNameCombination") float[] interpretSensorEvent(@NonNull Context context, @Nullable SensorEvent event); void reset(); float getTiltSensitivity(); void setTiltSensitivity(float tiltSensitivity);  }