@Override
    public boolean equals(Object o) {
        if (o == null) {
            return false;
        }
        if(this == o) {
            return true;
        }
        if(!(o instanceof Money)) {
            return false;
        }
        Money money = (Money) o;
        return amount == money.amount && currency().equals(money.currency());
    }