### Question:
LinearValueScale implements ValueScale { @Override public double scaleValue(double value, double minValue, double maxValue, double newMinValue, double newMaxValue) { double oldRange = maxValue - minValue; double newRange = newMaxValue - newMinValue; return newMinValue + (value - minValue) / oldRange * newRange; }  @Override double scaleValue(double value, double minValue, double maxValue, double newMinValue, double newMaxValue); @Override double invScaleValue(double scaleValue, double minValue, double maxValue, double newMinValue, double newMaxValue); @Override ValueAxis references(Range range, int minRefs, int maxRefs);  }### Answer:
@Test public void scaleValue1() { ValueScale linearScale = ValueScales.linearScale(); assertThat(linearScale.scaleValue(3.5, 3, 4, 0, 100), equalTo(50.0)); }
@Test public void scaleValue2() { ValueScale linearScale = ValueScales.linearScale(); assertThat(linearScale.scaleValue(3.5, 3, 4, -100, 100), equalTo(0.0)); }