@@ -182,15 +182,15 @@ void persistChildren_ShouldReleaseStaleLockWhenLockAcquisitionFails() {
182182 .when (executionService ).executeSystemUserScoped (anyString (), any ());
183183 when (tenantRepository .fetchDataTenantIds ()).thenReturn (List .of (TENANT_ID ));
184184 when (subResourcesLockRepository .lockSubResource (any (), eq (TENANT_ID ))).thenReturn (Optional .empty ());
185- when (reindexStatusService .isReindexInProgressOrFailed (any () )).thenReturn (false );
185+ when (reindexStatusService .isReindexInProgressOrFailed ()).thenReturn (false );
186186 when (subResourcesLockRepository .checkAndReleaseStaleLock (any (), eq (TENANT_ID ), anyLong ())).thenReturn (true );
187187
188188 // Act
189189 service .persistChildren ();
190190
191191 // Assert
192192 verify (subResourcesLockRepository , times (3 )).lockSubResource (any (), eq (TENANT_ID ));
193- verify (reindexStatusService , times (3 )).isReindexInProgressOrFailed (any () );
193+ verify (reindexStatusService , times (3 )).isReindexInProgressOrFailed ();
194194 verify (subResourcesLockRepository , times (3 )).checkAndReleaseStaleLock (any (), eq (TENANT_ID ), anyLong ());
195195 verify (subResourcesLockRepository , never ()).unlockSubResource (any (), any (), any ());
196196 verify (subjectRepository , never ()).fetchByTimestamp (anyString (), any (), anyInt ());
@@ -204,15 +204,15 @@ void persistChildren_ShouldNotProcessWhenLockFailsAndNoStaleLock() {
204204 .when (executionService ).executeSystemUserScoped (anyString (), any ());
205205 when (tenantRepository .fetchDataTenantIds ()).thenReturn (List .of (TENANT_ID ));
206206 when (subResourcesLockRepository .lockSubResource (any (), eq (TENANT_ID ))).thenReturn (Optional .empty ());
207- when (reindexStatusService .isReindexInProgressOrFailed (any () )).thenReturn (false );
207+ when (reindexStatusService .isReindexInProgressOrFailed ()).thenReturn (false );
208208 when (subResourcesLockRepository .checkAndReleaseStaleLock (any (), eq (TENANT_ID ), anyLong ())).thenReturn (false );
209209
210210 // Act
211211 service .persistChildren ();
212212
213213 // Assert
214214 verify (subResourcesLockRepository , times (3 )).lockSubResource (any (), eq (TENANT_ID ));
215- verify (reindexStatusService , times (3 )).isReindexInProgressOrFailed (any () );
215+ verify (reindexStatusService , times (3 )).isReindexInProgressOrFailed ();
216216 verify (subResourcesLockRepository , times (3 )).checkAndReleaseStaleLock (any (), eq (TENANT_ID ), anyLong ());
217217 verify (subResourcesLockRepository , never ()).unlockSubResource (any (), any (), any ());
218218 verify (subjectRepository , never ()).fetchByTimestamp (anyString (), any (), anyInt ());
@@ -226,14 +226,14 @@ void persistChildren_ShouldSkipStaleLockCheckWhenReindexInProgress() {
226226 .when (executionService ).executeSystemUserScoped (anyString (), any ());
227227 when (tenantRepository .fetchDataTenantIds ()).thenReturn (List .of (TENANT_ID ));
228228 when (subResourcesLockRepository .lockSubResource (any (), eq (TENANT_ID ))).thenReturn (Optional .empty ());
229- when (reindexStatusService .isReindexInProgressOrFailed (any () )).thenReturn (true );
229+ when (reindexStatusService .isReindexInProgressOrFailed ()).thenReturn (true );
230230
231231 // Act
232232 service .persistChildren ();
233233
234234 // Assert
235235 verify (subResourcesLockRepository , times (3 )).lockSubResource (any (), eq (TENANT_ID ));
236- verify (reindexStatusService , times (3 )).isReindexInProgressOrFailed (any () );
236+ verify (reindexStatusService , times (3 )).isReindexInProgressOrFailed ();
237237 verify (subResourcesLockRepository , never ()).checkAndReleaseStaleLock (any (), any (), anyLong ());
238238 verify (subResourcesLockRepository , never ()).unlockSubResource (any (), any (), any ());
239239 verify (subjectRepository , never ()).fetchByTimestamp (anyString (), any (), anyInt ());
0 commit comments