### Question:
ReferenceableAxisImpl extends AbstractIrregularAxis<Double> { @Override protected Double extendFirstValue(Double firstVal, Double nextVal) { return firstVal - 0.5 * (nextVal - firstVal); } ReferenceableAxisImpl(String name, List<Double> axisValues, boolean isLongitude); @Override boolean wraps(); @Override int findIndexOf(Double position); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void testExtendFirstValue() { double first = 23.8; double next = 23.6; double expectedExtendedValue = first - (next - first) / 2.0; assertEquals(expectedExtendedValue, longAxis.extendFirstValue(first, next), delta); next = Double.POSITIVE_INFINITY; expectedExtendedValue = first - (next - first) / 2.0; assertEquals(expectedExtendedValue, longAxis.extendFirstValue(first, next), delta); first = Double.MAX_VALUE; next = 73.6; expectedExtendedValue = first - (next - first) / 2.0; assertEquals(expectedExtendedValue / 2.0, latAxis.extendFirstValue(first, next), delta); first = Double.NaN; next = 53.6; expectedExtendedValue = first - (next - first) / 2.0; assertEquals(expectedExtendedValue / 2.0, longAxis.extendFirstValue(first, next), delta); }