@@ -553,15 +553,14 @@ public void testGetArrayNoDeferredResults() {
553553 }
554554
555555 public void testGetArrayDeferredResults () throws DatastoreRpcException {
556- Set <Key > requestedKeys = new HashSet <Key >();
556+ Set <Key > requestedKeys = new HashSet <>();
557557 requestedKeys .add (KEY1 );
558558 requestedKeys .add (KEY2 );
559559 requestedKeys .add (KEY3 );
560560 requestedKeys .add (KEY4 );
561561 requestedKeys .add (KEY5 );
562- Iterator <Entity > iter =
563- createMockDatastoreForDeferredLookup ().get (KEY1 , KEY2 , KEY3 , KEY4 , KEY5 );
564- Set <Key > keysOfFoundEntities = new HashSet <Key >();
562+ Iterator <Entity > iter = createDatastoreForDeferredLookup ().get (KEY1 , KEY2 , KEY3 , KEY4 , KEY5 );
563+ Set <Key > keysOfFoundEntities = new HashSet <>();
565564 while (iter .hasNext ()) {
566565 keysOfFoundEntities .add (iter .next ().key ());
567566 }
@@ -570,7 +569,7 @@ public void testGetArrayDeferredResults() throws DatastoreRpcException {
570569
571570 public void testFetchArrayDeferredResults () throws DatastoreRpcException {
572571 List <Entity > foundEntities =
573- createMockDatastoreForDeferredLookup ().fetch (KEY1 , KEY2 , KEY3 , KEY4 , KEY5 );
572+ createDatastoreForDeferredLookup ().fetch (KEY1 , KEY2 , KEY3 , KEY4 , KEY5 );
574573 assertEquals (foundEntities .get (0 ).key (), KEY1 );
575574 assertEquals (foundEntities .get (1 ).key (), KEY2 );
576575 assertEquals (foundEntities .get (2 ).key (), KEY3 );
@@ -579,7 +578,7 @@ public void testFetchArrayDeferredResults() throws DatastoreRpcException {
579578 assertEquals (foundEntities .size (), 5 );
580579 }
581580
582- private Datastore createMockDatastoreForDeferredLookup () throws DatastoreRpcException {
581+ private Datastore createDatastoreForDeferredLookup () throws DatastoreRpcException {
583582 List <DatastoreV1 .Key > keysPb = new ArrayList <>();
584583 keysPb .add (KEY1 .toPb ());
585584 keysPb .add (KEY2 .toPb ());
0 commit comments