@Test
public void testEarningsSumOverMonth() {

    Statistics resource = new Statistics();
    UkelonnService ukelonn = mock(UkelonnService.class);
    when(ukelonn.earningsSumOverMonth(eq("jad"))).thenReturn(Arrays.asList(new SumYearMonth(125.0, 2016, 7)));
    resource.ukelonn = ukelonn;
    String username = "jad";
    List<SumYearMonth> earningsSumOverYear = resource.earningsSumOverMonth(username);
    assertThat(earningsSumOverYear).isNotEmpty();
    assertEquals(2016, earningsSumOverYear.get(0).getYear());
}