@Test(expected = IOException.class)
public void testSerializationWithoutMetadata() throws Exception {

  DatastoreSession session = new DatastoreSession(sessionManager);
  Entity attribute = Entity.newBuilder(new KeyFactory("project")
      .setKind("kind")
      .newKey("456"))
      .build();
  session.restoreFromEntities(sessionKey, Collections.singleton(attribute));
}