LongStatisticBinding implements StatisticBinding { @Override public void add(double amount) { statistics.incLong(statId, (long) amount); } LongStatisticBinding(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 LongStatisticBinding(statistics, statId); binding.add(1234.0); verify(statistics).incLong(statId, 1234); }