Payments extends ResourceBase { @GET @Path("{accountId}") public List<Transaction> payments(@PathParam("accountId") int accountId) { return ukelonn.getPayments(accountId); }  @GET @Path("{accountId}") List<Transaction> payments(@PathParam("accountId") int accountId); @Inject
    public UkelonnService ukelonn; }
@Test public void testGetPayments() { Account account = getJadAccount(); Payments resource = new Payments(); UkelonnService ukelonn = mock(UkelonnService.class); when(ukelonn.getPayments(anyInt())).thenReturn(getJadPayments()); resource.ukelonn = ukelonn; List<Transaction> jobs = resource.payments(account.getAccountId()); assertEquals(10, jobs.size()); }