Skip to content

Commit e6397d4

Browse files
committed
Fix sonar finding AZp41z3q7Kei0U644EOS.
1 parent a5f2c8b commit e6397d4

File tree

1 file changed

+4
-5
lines changed
  • powertools-parameters/powertools-parameters-ssm/src/test/java/software/amazon/lambda/powertools/parameters/ssm

1 file changed

+4
-5
lines changed

powertools-parameters/powertools-parameters-ssm/src/test/java/software/amazon/lambda/powertools/parameters/ssm/SSMProviderTest.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,10 @@ void withDecryption_concurrentCalls_shouldBeThreadSafe() throws InterruptedExcep
247247

248248
// THEN
249249
List<GetParameterRequest> requests = paramCaptor.getAllValues();
250-
assertThat(requests).hasSize(2);
251-
boolean hasDecryptedRequest = requests.stream().anyMatch(GetParameterRequest::withDecryption);
252-
boolean hasNonDecryptedRequest = requests.stream().anyMatch(r -> !r.withDecryption());
253-
assertThat(hasDecryptedRequest).isTrue();
254-
assertThat(hasNonDecryptedRequest).isTrue();
250+
assertThat(requests)
251+
.hasSize(2)
252+
.anyMatch(GetParameterRequest::withDecryption)
253+
.anyMatch(r -> !r.withDecryption());
255254
}
256255

257256
@Test

0 commit comments

Comments
 (0)