assertEquals(containers.get(64).embed.nativeEmbed.str, afterContainer.embed.nativeEmbed.str);
assertEquals(containers.get(64).embed.nativeEmbed.l, afterContainer.embed.nativeEmbed.l);
}
public void testEmbeddedModelNative() {
EmbeddedModel embed = new EmbeddedModel();
embed.id = "embed";
embed.alpha = "test";
embed.beta = 123;
embed.setGamma(true);
embed.sub = new EmbeddedSubModel();
embed.sub.id = "sub";
embed.sub.parent = embed;
pm.insert(embed);
EmbeddedContainerModelNative container = new EmbeddedContainerModelNative();
container.id = "container";
container.embed = embed;
pm.insert(container);
EmbeddedContainerModelNative afterContainer = pm.getByKey(EmbeddedContainerModelNative.class, container.id);
assertNotNull(afterContainer);
assertEquals(container.id, afterContainer.id);
assertNotNull(afterContainer.embed);
assertEquals(embed.id, afterContainer.embed.id);
// doesn't ignore @EmbedIgnore as it is not possible to have fine grain in Java serialization
assertEquals("test", afterContainer.embed.alpha);
assertEquals(embed.beta, afterContainer.embed.beta);
assertEquals(embed.isGamma(), afterContainer.embed.isGamma());
assertEquals("sub", afterContainer.embed.sub.id);
assertNull(afterContainer.embed.sub.parent);
}