### Question:
LogValueScale implements ValueScale { static int quantize(double value) { if (value <= 1) { return 1; } int exp = MathUtil.orderOf(value); double order = Math.pow(10, exp); double normalizedValue = value / order; if (normalizedValue <= 1) { normalizedValue = 1; } else if (normalizedValue <= 2) { normalizedValue = 2; } else if (normalizedValue <= 5) { normalizedValue = 5; } else if (normalizedValue <= 10) { normalizedValue = 10; } else { throw new IllegalStateException("Logic error: this should be unreachable"); } return (int) (normalizedValue * order); }  @Override double scaleValue(double value, double minValue, double maxValue, double newMinValue, double newMaxValue); @Override double invScaleValue(double scaleValue, double actualMinValue, double actualMaxValue, double scaleMinValue, double scaleMaxValue); @Override ValueAxis references(Range range, int minRefs, int maxRefs);  }### Answer:
@Test public void quantize1() { assertThat(LogValueScale.quantize(0.00045), equalTo(1)); }
@Test public void quantize2() { assertThat(LogValueScale.quantize(1.2), equalTo(2)); }
@Test public void quantize3() { assertThat(LogValueScale.quantize(33.5), equalTo(50)); }
@Test public void quantize4() { assertThat(LogValueScale.quantize(99.99), equalTo(100)); }