if (checkIfUsernameExists(newUsername, persons, this)) {
if (checkIfUsernameExists(newUsername, this)) {
    public void changeUsername(String newUsername, List<Person> persons) {        if (newUsername == null || newUsername.equals("")) {            throw new DomainException("error.person.nullOrEmptyUsername");        }        if (getUser() == null) {            throw new DomainException("error.person.unExistingUser");        }        if (checkIfUsernameExists(newUsername, persons, this)) {            throw new DomainException("error.person.existingUsername");        }        setUsername(newUsername);    }