}
public void setBalance(Money balance) {
if (!balance.getCurrency().equals(getCurrency())) {
throw new InvalidStateException(new InvalidValue[] {
new InvalidValue("currency for new balance ("+balance.getCurrency()+") does not match account currency ("+getCurrency()+")", getClass(), "balance", balance, this)
});
}
setBalance(balance.getValue());
}