@@ -553,10 +553,10 @@ void testKeyRotationKeyIdWrap(int[] existingIds, int[] nextIds) throws Exception
553553 var willNotRefresh = targetDate ().plusDays (30 );
554554 var lastSnapshot = SaltSnapshotBuilder .start ()
555555 .entries (
556- SaltBuilder .start ().lastUpdated (targetDate ().minusDays (90 )).refreshFrom (willNotRefresh ).currentKey (existingIds [0 ]),
557- SaltBuilder .start ().lastUpdated (targetDate ().minusDays (60 )).refreshFrom (willNotRefresh ).currentKey (existingIds [1 ]),
558- SaltBuilder .start ().lastUpdated (targetDate ().minusDays (60 )).refreshFrom (willNotRefresh ).currentKey (existingIds [2 ]),
559- SaltBuilder .start ().lastUpdated (targetDate ().minusDays (60 )).refreshFrom (willNotRefresh ).currentKey (existingIds [3 ]),
556+ SaltBuilder .start ().lastUpdated (targetDate ().minusDays (90 )).refreshFrom (willNotRefresh ).currentKeySalt (existingIds [0 ]),
557+ SaltBuilder .start ().lastUpdated (targetDate ().minusDays (60 )).refreshFrom (willNotRefresh ).currentKeySalt (existingIds [1 ]),
558+ SaltBuilder .start ().lastUpdated (targetDate ().minusDays (60 )).refreshFrom (willNotRefresh ).currentKeySalt (existingIds [2 ]),
559+ SaltBuilder .start ().lastUpdated (targetDate ().minusDays (60 )).refreshFrom (willNotRefresh ).currentKeySalt (existingIds [3 ]),
560560 SaltBuilder .start ().lastUpdated (targetDate ().minusDays (60 )).refreshFrom (willRefresh ).currentSalt (),
561561 SaltBuilder .start ().lastUpdated (targetDate ().minusDays (60 )).refreshFrom (willRefresh ).currentSalt (),
562562 SaltBuilder .start ().lastUpdated (targetDate ().minusDays (60 )).refreshFrom (willRefresh ).currentSalt ())
@@ -585,9 +585,9 @@ void testKeyRotationPopulatePreviousKey() throws Exception {
585585 var willRefresh = targetDate ();
586586 var willNotRefresh = targetDate ().plusDays (30 );
587587 var lastSnapshot = SaltSnapshotBuilder .start ()
588- .entries (SaltBuilder .start ().lastUpdated (targetDate ().minusDays (60 )).refreshFrom (willRefresh ).currentKey (0 , "keyKey" , "keySalt" ),
589- SaltBuilder .start ().lastUpdated (targetDate ().minusDays (60 )).refreshFrom (willNotRefresh ).currentKey (1 ),
590- SaltBuilder .start ().lastUpdated (targetDate ().minusDays (60 )).refreshFrom (willNotRefresh ).currentKey (2 ))
588+ .entries (SaltBuilder .start ().lastUpdated (targetDate ().minusDays (60 )).refreshFrom (willRefresh ).currentKeySalt (0 , "keyKey" , "keySalt" ),
589+ SaltBuilder .start ().lastUpdated (targetDate ().minusDays (60 )).refreshFrom (willNotRefresh ).currentKeySalt (1 ),
590+ SaltBuilder .start ().lastUpdated (targetDate ().minusDays (60 )).refreshFrom (willNotRefresh ).currentKeySalt (2 ))
591591 .build ();
592592
593593 var result = saltRotation .rotateSalts (lastSnapshot , minAges , 1 , targetDate ());
@@ -622,8 +622,8 @@ void testKeyRotationPreviousKeyVisibleFor90Days(int lastUpdatedDaysAgo, boolean
622622 var willRefresh = targetDate ();
623623 var willNotRefresh = targetDate ().plusDays (30 );
624624 var lastSnapshot = SaltSnapshotBuilder .start ()
625- .entries (SaltBuilder .start ().lastUpdated (targetDate ().minusDays (lastUpdatedDaysAgo )).refreshFrom (willNotRefresh ).currentKey (2 ).previousKey (0 ),
626- SaltBuilder .start ().lastUpdated (targetDate ().minusDays (lastUpdatedDaysAgo )).refreshFrom (willRefresh ).currentKey (1 )) // for sake of getting snapshot
625+ .entries (SaltBuilder .start ().lastUpdated (targetDate ().minusDays (lastUpdatedDaysAgo )).refreshFrom (willNotRefresh ).currentKeySalt (2 ).previousKeySalt (0 ),
626+ SaltBuilder .start ().lastUpdated (targetDate ().minusDays (lastUpdatedDaysAgo )).refreshFrom (willRefresh ).currentKeySalt (1 )) // for sake of getting snapshot
627627 .build ();
628628
629629 var result = saltRotation .rotateSalts (lastSnapshot , minAges , 1 , targetDate ());
@@ -644,7 +644,7 @@ void testKeyRotationKeyToSaltRotation() throws Exception {
644644 var willRefresh = targetDate ();
645645 var willNotRefresh = targetDate ().plusDays (30 );
646646 var lastSnapshot = SaltSnapshotBuilder .start ()
647- .entries (SaltBuilder .start ().lastUpdated (targetDate ().minusDays (60 )).refreshFrom (willRefresh ).currentKey (0 , "keyKey1" , "keySalt1" ),
647+ .entries (SaltBuilder .start ().lastUpdated (targetDate ().minusDays (60 )).refreshFrom (willRefresh ).currentKeySalt (0 , "keyKey1" , "keySalt1" ),
648648 SaltBuilder .start ().lastUpdated (targetDate ().minusDays (60 )).refreshFrom (willNotRefresh ).currentSalt ())
649649 .build ();
650650
0 commit comments