private static final SerializationStrategy SS =
SerializationManager.DEFAULT_SERIALIZATION_STRATEGY;
public void testInsert() throws EntityNotFoundException {
HasBytesJPA pojo = new HasBytesJPA();
pojo.setPrimBytes("prim bytes".getBytes());
pojo.setBytes(PrimitiveArrays.asList("bytes".getBytes()).toArray(new Byte[5]));
pojo.setByteList(PrimitiveArrays.asList("byte list".getBytes()));
pojo.setByteSet(new HashSet<Byte>(PrimitiveArrays.asList("byte set".getBytes())));
pojo.setByteCollection(PrimitiveArrays.asList("byte collection".getBytes()));
pojo.setOnePrimByte(Integer.valueOf(1).byteValue());
pojo.setOneByte(Integer.valueOf(2).byteValue());
pojo.setShortBlob(new ShortBlob("short blob".getBytes()));
pojo.setSerializedPrimBytes("serialized prim bytes".getBytes());
pojo.setSerializedBytes(PrimitiveArrays.asList("serialized bytes".getBytes()).toArray(new Byte[5]));
pojo.setSerializedByteList(PrimitiveArrays.asList("serialized byte list".getBytes()));
pojo.setSerializedByteSet(new HashSet<Byte>(PrimitiveArrays.asList("serialized byte set".getBytes())));
beginTxn();
em.persist(pojo);
commitTxn();
Entity e = ds.get(KeyFactory.createKey(HasBytesJPA.class.getSimpleName(), pojo.getId()));
assertEquals(new ShortBlob("prim bytes".getBytes()), e.getProperty("primBytes"));
assertEquals(new ShortBlob("bytes".getBytes()), e.getProperty("bytes"));
assertEquals(new ShortBlob("byte list".getBytes()), e.getProperty("byteList"));
assertEquals(new HashSet<Byte>(PrimitiveArrays.asList("byte set".getBytes())),
new HashSet<Byte>(PrimitiveArrays.asList(