Example #1
0
 /** @throws Exception */
 @Test
 public void bytesToEntity() throws Exception {
   Entity entity = new Entity(Datastore.createKey("Hoge", 1));
   byte[] bytes = DatastoreUtil.entityToBytes(entity);
   Entity entity2 = DatastoreUtil.bytesToEntity(bytes);
   assertThat(entity2, is(notNullValue()));
   assertThat(entity2, is(entity));
 }
Example #2
0
 /** @throws Exception */
 @Test
 public void entityToBytes() throws Exception {
   assertThat(DatastoreUtil.entityToBytes(new Entity("Hoge")), is(notNullValue()));
 }