}
assertEquals(embed.isGamma(), afterContainer.embed.isGamma());
}
public void testEmbeddedNative() {
EmbeddedNative embed = new EmbeddedNative();
embed.alpha = "test";
embed.beta = 123;
embed.setGamma(true);
embed.delta = 456L;
embed.eta = new ArrayList<String>() {{ add("one"); add("two"); }};
embed.myEnum = MyEnum.ONE;
embed.big = new BigDecimal("12345678.12345678");
embed.jsonEmbed = new EmbeddedNative.SubEmbed();
embed.jsonEmbed.str = "test";
embed.jsonEmbed.l = 123L;
embed.javaEmbed = new EmbeddedNative.SubEmbed();
embed.javaEmbed.str = "test";
embed.javaEmbed.l = 123L;
embed.nativeEmbed = new EmbeddedNative.SubEmbed();
embed.nativeEmbed.str = "test";
embed.nativeEmbed.l = 123L;
EmbeddedContainerNative container = new EmbeddedContainerNative();
container.id = "container";
container.normal = "string";
container.embed = embed;
pm.save(container);
EmbeddedContainerNative afterContainer = Model.getByKey(EmbeddedContainerNative.class, container.id);
assertNotNull(afterContainer);
assertEquals(container.id, afterContainer.id);
assertEquals(container.normal, afterContainer.normal);
assertNotNull(afterContainer.embed);
assertEquals(embed.alpha, afterContainer.embed.alpha);
assertEquals(embed.beta, afterContainer.embed.beta);
assertEquals(embed.isGamma(), afterContainer.embed.isGamma());
assertEquals(embed.myEnum, afterContainer.embed.myEnum);
assertEquals(embed.big, afterContainer.embed.big);
assertEquals(embed.jsonEmbed.str, afterContainer.embed.jsonEmbed.str);
assertEquals(embed.jsonEmbed.l, afterContainer.embed.jsonEmbed.l);
assertEquals(embed.javaEmbed.str, afterContainer.embed.javaEmbed.str);