From 10d16d8af813ec129d8e42cba8c4cfe435640596 Mon Sep 17 00:00:00 2001 From: anhefti Date: Wed, 3 Nov 2021 12:01:50 +0100 Subject: [PATCH] fixed tests --- .../integration/api/admin/ExamProctoringRoomServiceTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/admin/ExamProctoringRoomServiceTest.java b/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/admin/ExamProctoringRoomServiceTest.java index b13bc549..9c1874c6 100644 --- a/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/admin/ExamProctoringRoomServiceTest.java +++ b/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/admin/ExamProctoringRoomServiceTest.java @@ -51,7 +51,8 @@ public class ExamProctoringRoomServiceTest extends AdministrationAPIIntegrationT assertFalse(runningExamsForInstitution.hasError()); final Collection collection = runningExamsForInstitution.get(); assertFalse(collection.isEmpty()); - final Exam exam = collection.iterator().next(); + final Exam exam = collection.stream().filter(e -> e.id == 2L).findAny().orElse(null); + assertNotNull(exam); assertEquals("Demo Quiz 6 (MOCKUP)", exam.name); assertEquals("2", String.valueOf(exam.id)); }