Acute implements Degrees<T> { @Override public Number resolve(final InnerProduct<T> product) { return this.random * Math.PI / 2; } Acute(); @Override Number resolve(final InnerProduct<T> product);  }
@Test public void resolvesAcuteAngle() { final double angle = new Acute<>().resolve(new MkProduct<Object>()).doubleValue(); MatcherAssert.assertThat(angle, Matchers.greaterThanOrEqualTo(0.)); MatcherAssert.assertThat( angle, Matchers.lessThanOrEqualTo(Math.PI / 2) ); }
@Test public void toStringPrintsAngle() { final Acute<Object> acute = new Acute<>(); final Double angle = acute.resolve(new MkProduct<Object>()).doubleValue(); final int precision = 6; MatcherAssert.assertThat( acute.toString(), Matchers.containsString( Double.toString(angle * 2 / Math.PI).substring(0, precision) ) ); }