@Test
public void testInterpolation() {

  // values from Astronomical Algorithms page 25
  final double interpolatedValue = Astronomical.interpolate(/* value */ 0.877366,
      /* previousValue */ 0.884226, /* nextValue */ 0.870531, /* factor */ 4.35/24);
  assertThat(interpolatedValue).isWithin(0.000001).of(0.876125);
  final double i1 = Astronomical.interpolate(
      /* value */ 1, /* previousValue */ -1, /* nextValue */ 3, /* factor */ 0.6);
  assertThat(i1).isWithin(0.000001).of(2.2);
}