@Test
public void testRegisterPayment() {

    UkelonnServiceProvider ukelonn = getUkelonnServiceSingleton();
    UserManagementService useradmin = mock(UserManagementService.class);
    no.priv.bang.osgiservice.users.User user = new no.priv.bang.osgiservice.users.User(1, "jad", "jad@gmail.com", "Jane", "Doe");
    when(useradmin.getUser(anyString())).thenReturn(user);
    ukelonn.setUserAdmin(useradmin);
    // Create the request
    Account account = ukelonn.getAccount("jad");
    double originalBalance = account.getBalance();
    List<TransactionType> paymenttypes = ukelonn.getPaymenttypes();
    PerformedTransaction payment = new PerformedTransaction(account, paymenttypes.get(0).getId(), account.getBalance(), new Date());
    // Run the method under test
    Account result = ukelonn.registerPayment(payment);
    // Check the response
    assertEquals("jad", result.getUsername());
    assertThat(result.getBalance()).isLessThan(originalBalance);
}