public Account copy() { Account dst = new Account(); copyValues(dst); if (identifier != null) { dst.identifier = new ArrayList<Identifier>(); for (Identifier i : identifier) dst.identifier.add(i.copy()); } ; dst.name = name == null ? null : name.copy(); dst.type = type == null ? null : type.copy(); dst.status = status == null ? null : status.copy(); dst.activePeriod = activePeriod == null ? null : activePeriod.copy(); dst.currency = currency == null ? null : currency.copy(); dst.balance = balance == null ? null : balance.copy(); dst.coveragePeriod = coveragePeriod == null ? null : coveragePeriod.copy(); dst.subject = subject == null ? null : subject.copy(); dst.owner = owner == null ? null : owner.copy(); dst.description = description == null ? null : description.copy(); return dst; }
public Account createAccount(BigDecimal balance) { Account account = new Account(); account.balance = balance; account.name = generateString(new Random(), "Test name", 10); return account; }