DoubleStatisticBinding implements StatisticBinding { @Override public void add(double amount) { statistics.incDouble(statId, amount); } DoubleStatisticBinding(Statistics statistics, int statId); @Override void add(double amount); @Override double doubleValue(); @Override long longValue();  }
@Test public void add_addsAmountToStat() { int statId = 27; StatisticBinding binding = new DoubleStatisticBinding(statistics, statId); binding.add(1234.8); verify(statistics).incDouble(statId, 1234.8); }