@Test(expected=BadRequestException.class)
public void testPasswordWithEmptyUsername() {

    AdminUserResource resource = new AdminUserResource();
    // Inject OSGi services into the resource
    UserManagementServiceProvider useradmin = new UserManagementServiceProvider();
    resource.useradmin = useradmin;
    UkelonnService ukelonn = mock(UkelonnService.class);
    resource.ukelonn = ukelonn;
    MockLogService logservice = new MockLogService();
    resource.logservice = logservice;
    useradmin.setLogservice(logservice);
    // Create a passwords object containing the user and with
    // valid and identical passwords
    UserAndPasswords passwords = new UserAndPasswords(null, "zecret", "zecret", false);
    // Changing the password should fail
    resource.password(passwords);
    fail("Should never get here!");
}