@@ -140,7 +140,7 @@ void addSnapshotWithSameSequenceReplacesExisting() {
140140
141141 // Verify only second snapshot exists
142142 GetLastSnapshotResponse last = snapshotChannel .getLastSnapshot (
143- GetLastSnapshotRequest .newBuilder ().setKey (key ).build ()
143+ GetLastSnapshotRequest .newBuilder ().addKey (key ).build ()
144144 ).join ();
145145
146146 assertNotNull (last );
@@ -174,7 +174,7 @@ void addNewSnapshotToEmptyStoreIsRetrievable() {
174174 snapshotChannel .addSnapshot (request ).join ();
175175
176176 GetLastSnapshotResponse result = snapshotChannel .getLastSnapshot (
177- GetLastSnapshotRequest .newBuilder ().setKey (key ).build ()
177+ GetLastSnapshotRequest .newBuilder ().addKey (key ).build ()
178178 ).join ();
179179
180180 assertNotNull (result );
@@ -267,7 +267,7 @@ void addingSubsequentSnapshotsWithPruneDisabledKeepsAllSnapshots() throws Interr
267267 assertTrue (latch .await (10 , TimeUnit .SECONDS ));
268268
269269 GetLastSnapshotResponse last = snapshotChannel .getLastSnapshot (
270- GetLastSnapshotRequest .newBuilder ().setKey (key ).build ()
270+ GetLastSnapshotRequest .newBuilder ().addKey (key ).build ()
271271 ).join ();
272272
273273 assertNotNull (last );
@@ -325,7 +325,7 @@ void deletingAllSnapshotsMakesGetLastThrowException() {
325325 // GetLast should return empty response
326326 assertThrows (CompletionException .class , ()->{
327327 snapshotChannel .getLastSnapshot (
328- GetLastSnapshotRequest .newBuilder ().setKey (key ).build ()
328+ GetLastSnapshotRequest .newBuilder ().addKey (key ).build ()
329329 ).join ();
330330 });
331331
@@ -343,7 +343,7 @@ void sequenceBecomesImmediatelyReusableAfterDeletion() {
343343
344344 // Verify it exists
345345 GetLastSnapshotResponse first = snapshotChannel .getLastSnapshot (
346- GetLastSnapshotRequest .newBuilder ().setKey (key ).build ()
346+ GetLastSnapshotRequest .newBuilder ().addKey (key ).build ()
347347 ).join ();
348348 assertEquals (value1 , first .getSnapshot ().getPayload ());
349349
@@ -358,7 +358,7 @@ void sequenceBecomesImmediatelyReusableAfterDeletion() {
358358 // Verify it's gone
359359 assertThrows (CompletionException .class , ()->{
360360 snapshotChannel .getLastSnapshot (
361- GetLastSnapshotRequest .newBuilder ().setKey (key ).build ()
361+ GetLastSnapshotRequest .newBuilder ().addKey (key ).build ()
362362 ).join ();
363363 });
364364
@@ -367,7 +367,7 @@ void sequenceBecomesImmediatelyReusableAfterDeletion() {
367367
368368 // Verify new snapshot is there
369369 GetLastSnapshotResponse reused = snapshotChannel .getLastSnapshot (
370- GetLastSnapshotRequest .newBuilder ().setKey (key ).build ()
370+ GetLastSnapshotRequest .newBuilder ().addKey (key ).build ()
371371 ).join ();
372372 assertTrue (reused .hasSnapshot ());
373373 assertEquals (sequence , reused .getSequence ());
@@ -427,7 +427,7 @@ void getLastReturnsNullWhenNoSnapshotExistsForKey() {
427427
428428 assertThrows (CompletionException .class , ()->{
429429 snapshotChannel .getLastSnapshot (
430- GetLastSnapshotRequest .newBuilder ().setKey (key ).build ()
430+ GetLastSnapshotRequest .newBuilder ().addKey (key ).build ()
431431 ).join ();
432432 });
433433 }
@@ -472,7 +472,7 @@ void addDeleteAddSameSequenceDemonstratesSequenceReusability() {
472472
473473 // Verify
474474 GetLastSnapshotResponse first = snapshotChannel .getLastSnapshot (
475- GetLastSnapshotRequest .newBuilder ().setKey (key ).build ()
475+ GetLastSnapshotRequest .newBuilder ().addKey (key ).build ()
476476 ).join ();
477477 assertEquals (value1 , first .getSnapshot ().getPayload ());
478478
@@ -487,7 +487,7 @@ void addDeleteAddSameSequenceDemonstratesSequenceReusability() {
487487 // Verify deletion
488488 assertThrows (CompletionException .class , ()->{
489489 snapshotChannel .getLastSnapshot (
490- GetLastSnapshotRequest .newBuilder ().setKey (key ).build ()
490+ GetLastSnapshotRequest .newBuilder ().addKey (key ).build ()
491491 ).join ();
492492 });
493493
@@ -496,7 +496,7 @@ void addDeleteAddSameSequenceDemonstratesSequenceReusability() {
496496
497497 // Verify new value
498498 GetLastSnapshotResponse second = snapshotChannel .getLastSnapshot (
499- GetLastSnapshotRequest .newBuilder ().setKey (key ).build ()
499+ GetLastSnapshotRequest .newBuilder ().addKey (key ).build ()
500500 ).join ();
501501 assertTrue (second .hasSnapshot ());
502502 assertEquals (sequence , second .getSequence ());
@@ -540,7 +540,7 @@ void appendingTwoMillionSnapshotsWithPruneEnabledCompletesInReasonableTime() thr
540540
541541 // Verify only last snapshot remains
542542 GetLastSnapshotResponse last = snapshotChannel .getLastSnapshot (
543- GetLastSnapshotRequest .newBuilder ().setKey (key ).build ()
543+ GetLastSnapshotRequest .newBuilder ().addKey (key ).build ()
544544 ).join ();
545545 assertTrue (last .hasSnapshot ());
546546 assertEquals (totalSnapshots - 1 , last .getSequence ());
0 commit comments