o1.setCharWrapperArray(new Character[] {
new Character('a'), new Character('b')
});
o1.setEnumType(EnumType.b);
o1.setSerializableType(new SerializableType("c"));
getEntityManager().persist(o1);
getEntityManager().getTransaction().commit();
assertEquals("abc", getDbHelper().getObject(
"PropertyDefaultsOtherEntity",
"string"));
assertEquals(2, getDbHelper().getInt("PropertyDefaultsOtherEntity", "bigInt"));
assertEquals(3.5d, getDbHelper().getDouble(
"PropertyDefaultsOtherEntity",
"bigDecimal"));
byte[] b1 = getDbHelper().getBytes("PropertyDefaultsOtherEntity", "byteArray");
assertNotNull(b1);
assertEquals(2, b1.length);
assertEquals((byte) 1, b1[0]);
assertEquals((byte) 2, b1[1]);
byte[] b2 = getDbHelper().getBytes(
"PropertyDefaultsOtherEntity",
"byteWrapperArray");
assertNotNull(b2);
assertEquals(2, b2.length);
assertEquals((byte) 1, b2[0]);
assertEquals((byte) 2, b2[1]);
assertEquals("ab", getDbHelper().getObject(
"PropertyDefaultsOtherEntity",
"charArray"));
assertEquals("ab", getDbHelper().getObject(
"PropertyDefaultsOtherEntity",
"charWrapperArray"));
assertEquals(1, getDbHelper().getInt("PropertyDefaultsOtherEntity", "enumType"));
byte[] ser = getDbHelper().getBytes(
"PropertyDefaultsOtherEntity",
"serializableType");
assertNotNull(ser);
SerializableType so = (SerializableType) new ObjectInputStream(
new ByteArrayInputStream(ser)).readObject();
assertNotNull(so);
assertEquals("c", so.getKey());
}