diff options
Diffstat (limited to 'runtime-acm')
-rwxr-xr-x | runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/participant/ParticipantControllerTest.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/participant/ParticipantControllerTest.java b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/participant/ParticipantControllerTest.java index a90773b10..f8443de33 100755 --- a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/participant/ParticipantControllerTest.java +++ b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/participant/ParticipantControllerTest.java @@ -31,6 +31,7 @@ import jakarta.ws.rs.core.Response; import java.util.ArrayList; import java.util.List; import java.util.UUID; +import java.util.stream.Collectors; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -128,7 +129,12 @@ class ParticipantControllerTest extends CommonRestController { var response = invocationBuilder.buildGet().invoke(); assertEquals(Response.Status.OK.getStatusCode(), response.getStatus()); List<ParticipantInformation> entityList = response.readEntity(new GenericType<>() {}); - assertThat(entityList).hasSameSizeAs(inputParticipants); + assertThat(entityList).isNotEmpty(); + var participantIds = entityList.stream().map(ParticipantInformation::getParticipant) + .map(Participant::getParticipantId).collect(Collectors.toSet()); + inputParticipants.forEach(p -> { + assertThat(participantIds).contains(p.getParticipantId()); + }); } @Test |