### Question:
AxisRanges { public static AxisRange auto() { return AUTO; } private  AxisRanges(); static AxisRange fixed(final double min, final double max); static AxisRange data(); static AxisRange auto(); static AxisRange auto(double minUsage); static AxisRange display();  }### Answer:
@Test public void auto1() { AxisRange axisRange = AxisRanges.auto(); assertThat(axisRange.toString(), equalTo("auto(80%)")); AxisRangeInstance axisRangeInstance = axisRange.createInstance(); Range range = axisRangeInstance.axisRange(Ranges.range(3.0, 5.0), Ranges.range(-3.0, 4.0)); assertThat(range.getMinimum(), equalTo((Number) 3.0)); assertThat(range.getMaximum(), equalTo((Number) 5.0)); range = axisRangeInstance.axisRange(Ranges.range(4.0, 15.0), Ranges.range(-3.0, 4.0)); assertThat(range.getMinimum(), equalTo((Number) 3.0)); assertThat(range.getMaximum(), equalTo((Number) 15.0)); }
@Test public void auto2() { AxisRange axisRange = AxisRanges.auto(); assertThat(axisRange.toString(), equalTo("auto(80%)")); AxisRangeInstance axisRangeInstance = axisRange.createInstance(); Range range = axisRangeInstance.axisRange(Ranges.range(3.0, 5.0), Ranges.range(-3.0, 4.0)); assertThat(range.getMinimum(), equalTo((Number) 3.0)); assertThat(range.getMaximum(), equalTo((Number) 5.0)); range = axisRangeInstance.axisRange(Ranges.range(1000000.0, 1000015.0), Ranges.range(-3.0, 4.0)); assertThat(range.getMinimum(), equalTo((Number) 1000000.0)); assertThat(range.getMaximum(), equalTo((Number) 1000015.0)); }
@Test public void autoEquals() { assertThat(AxisRanges.auto(), equalTo(AxisRanges.auto())); assertThat(AxisRanges.auto(0.5), equalTo(AxisRanges.auto(0.5))); assertThat(AxisRanges.auto(0.5), not(equalTo(AxisRanges.auto(0.8)))); }