@Nullable
    public String ensureUser(String userName, String password, String firstName, String lastName, String email,
                             Set<String> expectedRoles) {
        return ensureUser(userName, password, firstName, lastName, email, expectedRoles, false);
    }
@Test
    @MongoDBFixtures("duplicated-users.json")
    public void ensureUserWithDuplicates() throws ValidationException {

        final TestUserService testUserService = new TestUserService(mongodb.mongoConnection());
        migrationHelpers = new MigrationHelpers(roleService, testUserService, roleRemover);

        assertThat(testUserService.loadAll()).hasSize(2);
        assertThatThrownBy(() -> testUserService.load("test-user")).isInstanceOf(UserServiceImpl.DuplicateUserException.class);

        assertThat(migrationHelpers.ensureUser("test-user", "pass", "Test", "User",
                "test@example.com", Set.of()))
                .isEqualTo("5b8e4ef17ad37b64ee87eb57");

        assertThat(testUserService.load("test-user")).isNotNull();
        assertThat(testUserService.loadAll()).hasSize(2);
    }