class SelfCheckingPartyRepository implements PartyRepository {

    @Override
    public InviteResult invite(String owner, String player, int expiration) {
        // A player can not invite himself.
        return owner.equalsIgnoreCase(player) ? InviteResult.INVITE_SELF : delegate.invite(owner, player, expiration);
    }

}