@Test
public void testAddAccount() {

    UkelonnServiceProvider ukelonn = getUkelonnServiceSingleton();
    UserManagementServiceProvider usermanagement = new UserManagementServiceProvider();
    usermanagement.setLogservice(ukelonn.getLogservice());
    usermanagement.setDataSource(ukelonn.getDataSource());
    ukelonn.setUserAdmin(usermanagement);
    // Create a user object
    String newUsername = "aragorn";
    String newEmailaddress = "strider@hotmail.com";
    String newFirstname = "Aragorn";
    String newLastname = "McArathorn";
    no.priv.bang.osgiservice.users.User user = new no.priv.bang.osgiservice.users.User(0, newUsername, newEmailaddress, newFirstname, newLastname);
    // Create a passwords object containing the user
    UserAndPasswords passwords = new UserAndPasswords(user, "zecret", "zecret", false);
    // Create a user in the database, and retrieve it (to get the user id)
    List<no.priv.bang.osgiservice.users.User> updatedUsers = usermanagement.addUser(passwords);
    no.priv.bang.osgiservice.users.User createdUser = updatedUsers.stream().filter(u -> newUsername.equals(u.getUsername())).findFirst().get();
    // Add a new account to the database
    User userWithUserId = new User(createdUser.getUserid(), newUsername, newEmailaddress, newFirstname, newLastname);
    Account newAccount = ukelonn.addAccount(userWithUserId);
    assertThat(newAccount.getAccountId()).isPositive();
    assertEquals(0.0, newAccount.getBalance(), 0);
}