DatastoreV1 { public DeleteKey deleteKey() { return new DeleteKey(null, null); } DatastoreV1(); DatastoreV1.Read read(); Write write(); DeleteEntity deleteEntity(); DeleteKey deleteKey();  }
@Test public void testDeleteKeyDisplayData() { DeleteKey deleteKey = DatastoreIO.v1().deleteKey().withProjectId(PROJECT_ID); DisplayData displayData = DisplayData.from(deleteKey); assertThat(displayData, hasDisplayItem("projectId", PROJECT_ID)); }
@Test public void testDeleteKeyPrimitiveDisplayData() { DisplayDataEvaluator evaluator = DisplayDataEvaluator.create(); PTransform<PCollection<Key>, ?> write = DatastoreIO.v1().deleteKey().withProjectId("myProject"); Set<DisplayData> displayData = evaluator.displayDataForPrimitiveTransforms(write); assertThat( "DatastoreIO write should include the project in its primitive display data", displayData, hasItem(hasDisplayItem("projectId"))); assertThat( "DatastoreIO write should include the deleteKeyFn in its primitive display data", displayData, hasItem(hasDisplayItem("deleteKeyFn"))); }