LongStatisticBinding implements StatisticBinding { @Override public long longValue() { return statistics.getLong(statId); } LongStatisticBinding(Statistics statistics, int statId); @Override void add(double amount); @Override double doubleValue(); @Override long longValue();  }
@Test public void longValue_returnsLongStatValue() { int statId = 27; StatisticBinding binding = new LongStatisticBinding(statistics, statId); when(statistics.getLong(statId)).thenReturn(2341L); assertThat(binding.longValue()) .isEqualTo(2341L); }