DatastoreV1 { public DeleteEntity deleteEntity() { return new DeleteEntity(null, null); } DatastoreV1(); DatastoreV1.Read read(); Write write(); DeleteEntity deleteEntity(); DeleteKey deleteKey();  }
@Test public void testDeleteEntityDisplayData() { DeleteEntity deleteEntity = DatastoreIO.v1().deleteEntity().withProjectId(PROJECT_ID); DisplayData displayData = DisplayData.from(deleteEntity); assertThat(displayData, hasDisplayItem("projectId", PROJECT_ID)); }
@Test public void testDeleteEntityPrimitiveDisplayData() { DisplayDataEvaluator evaluator = DisplayDataEvaluator.create(); PTransform<PCollection<Entity>, ?> write = DatastoreIO.v1().deleteEntity().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 deleteEntityFn in its primitive display data", displayData, hasItem(hasDisplayItem("deleteEntityFn"))); }