	@Test
	public void testServoRange() {

		float min_pulse_width_ms = 0.75f;
		float max_pulse_width_ms = 2.25f;
		float minus90_pulse_width_ms = 1f;
		float plus90_pulse_width_ms = 2f;

		Assert.assertEquals(
				RangeUtil.map(min_pulse_width_ms, minus90_pulse_width_ms, plus90_pulse_width_ms, 0, 180, false), -45);
		Assert.assertEquals(
				RangeUtil.map(max_pulse_width_ms, minus90_pulse_width_ms, plus90_pulse_width_ms, 0, 180, false), 225);
		Assert.assertEquals(
				RangeUtil.map(minus90_pulse_width_ms, minus90_pulse_width_ms, plus90_pulse_width_ms, 0, 180, false), 0);
		Assert.assertEquals(
				RangeUtil.map(plus90_pulse_width_ms, minus90_pulse_width_ms, plus90_pulse_width_ms, 0, 180, false),
				180);
		Assert.assertEquals(RangeUtil.map((minus90_pulse_width_ms + plus90_pulse_width_ms) / 2, minus90_pulse_width_ms,
				plus90_pulse_width_ms, 0, 180, false), 90);
		
		Assert.assertEquals(0, RangeUtil.map(-1, -1, 1, 0, 180));
		Assert.assertEquals(90, RangeUtil.map(0, -1, 1, 0, 180));
		Assert.assertEquals(180, RangeUtil.map(1, -1, 1, 0, 180));
		
		int servo_centre = 90;
		float value = -1;
		float pz_value = Math.round(servo_centre * value) + servo_centre;
		Assert.assertEquals(pz_value, RangeUtil.map(value, -1, 1, 0, 180), DELTA_F);
		value = 0;
		pz_value = Math.round(servo_centre * value) + servo_centre;
		Assert.assertEquals(pz_value, RangeUtil.map(value, -1, 1, 0, 180), DELTA_F);
		value = 1;
		pz_value = Math.round(servo_centre * value) + servo_centre;
		Assert.assertEquals(pz_value, RangeUtil.map(value, -1, 1, 0, 180), DELTA_F);
	}