DataContext context = createDataContext();
SerializableEntity test = context
.newObject(SerializableEntity.class);
MockSerializable i = new MockSerializable("abc");
test.setSerializableField(i);
context.commitChanges();
SelectQuery q = new SelectQuery(SerializableEntity.class);
SerializableEntity testRead = (SerializableEntity) context.performQuery(q).get(0);
assertNotNull(testRead.getSerializableField());
assertEquals(i.getName(), testRead.getSerializableField().getName());
test.setSerializableField(null);
context.commitChanges();
}