new Value(10000), new Value(1500));
Iterable<CompressionType> compressionTypes =
asList(CompressionType.NONE, CompressionType.GZIP, null);
for (Value original : values) {
for (CompressionType compression : compressionTypes) {
Transaction tx = datastore.beginTransaction();
Entity entity = new Entity(key);
SerializationUtil.serializeToDatastoreProperty(tx, entity, "foo", original, compression);
datastore.put(entity);
tx.commit();
entity = datastore.get(key);
Serializable restored = SerializationUtil.deserializeFromDatastoreProperty(entity, "foo");
assertEquals(original, restored);
}
}