DblAddition implements FieldAddition<Double> { @Override public Double inverse(final Double elt) { return -elt; }  @Override Double add(final Double operand, final Double second); @Override Double neutral(); @Override Double inverse(final Double elt);  }
@Test public void calculatesAdditionInverse() { final double epsilon = 1.e-6; final double first = Math.random(); MatcherAssert.assertThat( new DblAddition().inverse(first), Matchers.closeTo(-first, epsilon) ); }