@Test
public void testGet() throws DatabaseObjectNotFound {

    // Create a record in the database
    Datastore datastore = getService();
    KeyFactory keyFactory = datastore.newKeyFactory().setKind("Foo");
    Key key = keyFactory.newKey("myid");
    Entity.Builder builder = Entity.newBuilder(key);
    builder.set("longVal", 1564094282994L);
    builder.set("byteVal", Blob.copyFrom("abcd".getBytes()));
    builder.set("stringList", "hello", "hi");
    Entity entity = builder.build();
    datastore.put(entity);
    // Check that the record is correctly retrieved
    CloudDatastoreBackend backend = new CloudDatastoreBackend();
    Foo foo = (Foo) backend.get(Foo.class, "myid");
    assertEquals("myid", foo.getId());
    assertEquals(1564094282994L, foo.getLongVal().longValue());
    assertArrayEquals("abcd".getBytes(), foo.getByteVal());
    assertEquals(List.of("hello", "hi"), foo.getStringList());
}