diff --git a/fh.fd.ci.server/src/test/java/de/fd/fh/ServerAppTest.java b/fh.fd.ci.server/src/test/java/de/fd/fh/ServerAppTest.java index 125d6d9..1a9934d 100644 --- a/fh.fd.ci.server/src/test/java/de/fd/fh/ServerAppTest.java +++ b/fh.fd.ci.server/src/test/java/de/fd/fh/ServerAppTest.java @@ -179,5 +179,22 @@ class ServerAppTest assertNotNull(res); assertEquals(200, res.getStatus()); then(gameController).should().createGame(any(), any()); + then(gameController).shouldHaveNoMoreInteractions(); + } + + @Test + void testFindGameById() throws JsonProcessingException + { + when(gameController.findGameById(any(), any())).thenReturn(mock(Response.class)); + + final String url = "/games/12345"; + + ApiTestUtils.TestResponse res = new ApiTestUtils() + .request("GET", url, null, null, String.class); + + assertNotNull(res); + assertEquals(200, res.getStatus()); + then(gameController).should().findGameById(any(), any()); + then(gameController).shouldHaveNoMoreInteractions(); } } \ No newline at end of file