* @param accountType
* @param num
* @return new instance
*/
private static Model stubAccount(Model parentAccount, TestEntityType accountType, int num) {
final Model m = stubModel(accountType, null, true, accountType.descriptor() + " " + num);
m
.set(new EnumPropertyValue("status", new PropertyMetadata(PropertyType.ENUM, false, true, 16),
AccountStatus.OPEN));
m.set(new BooleanPropertyValue("persistPymntInfo", new PropertyMetadata(PropertyType.BOOL, false, true, -1),
Boolean.TRUE));
m.set(new StringPropertyValue("billingModel", new PropertyMetadata(PropertyType.STRING, false, true, 32),
"a billing model"));
m.set(new StringPropertyValue("billingCycle", new PropertyMetadata(PropertyType.STRING, false, true, 32),
"a billing cycle"));
m
.set(new DatePropertyValue("dateLastCharged", new PropertyMetadata(PropertyType.DATE, false, true, 32),
new Date()));
m
.set(new DatePropertyValue("nextChargeDate", new PropertyMetadata(PropertyType.DATE, false, true, 32),
new Date()));
m.set(new DatePropertyValue("dateCancelled", new PropertyMetadata(PropertyType.DATE, false, true, 32), new Date()));
m.set(new RelatedOneProperty(TestEntityType.CURRENCY, stubCurrency(), "currency", true));
m.set(new RelatedOneProperty(TestEntityType.PAYMENT_INFO, stubPaymentInfo(), "paymentInfo", false));
m.set(new RelatedOneProperty(TestEntityType.ACCOUNT, parentAccount, "parent", true));
return m;
}