diff --git a/api/src/test/java/ca/bc/gov/educ/api/trax/controller/v2/SchoolControllerIntegrationTest.java b/api/src/test/java/ca/bc/gov/educ/api/trax/controller/v2/SchoolControllerIntegrationTest.java index a28c89bc..c09d2866 100644 --- a/api/src/test/java/ca/bc/gov/educ/api/trax/controller/v2/SchoolControllerIntegrationTest.java +++ b/api/src/test/java/ca/bc/gov/educ/api/trax/controller/v2/SchoolControllerIntegrationTest.java @@ -160,7 +160,7 @@ void testReloadSchoolsIntoCache_shouldReturnOK() throws Exception { @Test void testReloadSchoolsIntoCache_shouldReturnUnprocessableEntity() throws Exception { SchoolService schoolServiceMock = mock(SchoolService.class); - doThrow(Exception.class).when(schoolServiceMock).initializeSchoolCache(true); + doThrow(RuntimeException.class).when(schoolServiceMock).initializeSchoolCache(true); mockMvc.perform(MockMvcRequestBuilders.put("/api/v2/trax/school/cache/schools") .with(jwt().jwt(jwt -> jwt.claim("scope", "UPDATE_GRAD_TRAX_CACHE"))) .accept(MediaType.APPLICATION_JSON)) @@ -178,7 +178,7 @@ void testReloadSchoolDetailssIntoCache_shouldReturnOK() throws Exception { @Test void testReloadSchoolDetailsIntoCache_shouldReturnUnprocessableEntity() throws Exception { SchoolService schoolServiceMock = mock(SchoolService.class); - doThrow(Exception.class).when(schoolServiceMock).initializeSchoolDetailCache(true); + doThrow(RuntimeException.class).when(schoolServiceMock).initializeSchoolDetailCache(true); mockMvc.perform(MockMvcRequestBuilders.put("/api/v2/trax/school/cache/school-details") .with(jwt().jwt(jwt -> jwt.claim("scope", "UPDATE_GRAD_TRAX_CACHE"))) .accept(MediaType.APPLICATION_JSON))