### Question:
LogValueScale implements ValueScale { static int decreaseFactor(int factor) { if (factor == 1) { return 1; } int order = 1; while (factor >= 10) { factor /= 10; order *= 10; } if (factor == 1) { return order / 2; } if (factor == 5) { return order * 2; } if (factor == 2) { return order; } throw new IllegalStateException("Logic error: this should be unreachable"); }  @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 decreaseFactor1() { assertThat(LogValueScale.decreaseFactor(200), equalTo(100)); }
@Test public void decreaseFactor2() { assertThat(LogValueScale.decreaseFactor(100), equalTo(50)); }
@Test public void decreaseFactor3() { assertThat(LogValueScale.decreaseFactor(1), equalTo(1)); }
@Test public void decreaseFactor4() { assertThat(LogValueScale.decreaseFactor(5), equalTo(2)); }