Accounts extends ResourceBase { @GET public List<Account> accounts() { return ukelonn.getAccounts(); }  @GET List<Account> accounts();  }
@Test public void testGetAccounts() throws Exception { Accounts resource = new Accounts(); UkelonnService ukelonn = mock(UkelonnService.class); when(ukelonn.getAccounts()).thenReturn(getDummyAccounts()); resource.ukelonn = ukelonn; List<Account> result = resource.accounts(); assertEquals(2, result.size()); }