final AccountAddress aa1 = getEntityBeanFactory().getEntityCopy(AccountAddress.class, false);
final AccountAddress aa2 = getEntityBeanFactory().getEntityCopy(AccountAddress.class, true);
e.addAccountAddress(aa1);
e.addAccountAddress(aa2);
final Model m = marshaler.marshalEntity(e, MarshalOptions.UNCONSTRAINED_MARSHALING);
m.indexed("addresses[0]").getModel().setMarkedDeleted(true);
final Account rea = marshaler.marshalModel(m, e);
Assert.assertTrue(e == rea);
Assert.assertTrue(e.equals(rea));
Assert.assertEquals(rea.getVersion(), m.getProperty(Model.VERSION_PROPERTY));
Assert.assertTrue(e.getAddresses() != null);
Assert.assertTrue(e.getAddresses().size() == 1);
Assert.assertTrue(e.getAddresses().iterator().next().equals(aa2));
}