diff --git a/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/admin/WebserviceInfoTest.java b/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/admin/WebserviceInfoTest.java index 72974be5..2d60276f 100644 --- a/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/admin/WebserviceInfoTest.java +++ b/src/test/java/ch/ethz/seb/sebserver/webservice/integration/api/admin/WebserviceInfoTest.java @@ -51,7 +51,7 @@ public class WebserviceInfoTest extends AdministrationAPIIntegrationTester { @Test public void test_getInstitutionInfo() throws Exception { - final Collection result = new RestAPITestHelper() + Collection result = new RestAPITestHelper() .withAccessToken(getAdminInstitution1Access()) .withPath(API.INFO_ENDPOINT + API.INFO_INST_PATH_SEGMENT) .withMethod(HttpMethod.GET) @@ -64,6 +64,20 @@ public class WebserviceInfoTest extends AdministrationAPIIntegrationTester { assertTrue(result.stream().filter(en -> "Institution2".equals(en.name)).findFirst().isPresent()); assertFalse(result.stream().filter(en -> "Institution3".equals(en.name)).findFirst().isPresent()); + result = new RestAPITestHelper() + .withAccessToken(getAdminInstitution1Access()) + .withPath(API.INFO_ENDPOINT + API.INFO_INST_PATH_SEGMENT) + .withPath("/inst2") + .withMethod(HttpMethod.GET) + .withExpectedStatus(HttpStatus.OK) + .getAsObject(new TypeReference>() { + }); + + assertNotNull(result); + assertFalse(result.stream().filter(en -> "Institution1".equals(en.name)).findFirst().isPresent()); + assertTrue(result.stream().filter(en -> "Institution2".equals(en.name)).findFirst().isPresent()); + assertFalse(result.stream().filter(en -> "Institution3".equals(en.name)).findFirst().isPresent()); + } }