There are 4 REST endpoints in total, they should be covered by tests to ensure API contract. These tests should only validate the response format and if input is correctly read by the routes/controllers. The logic behind these routes should not be tested and should be mocked. If its impossible to mock something (for example the class is not open and doesn't implement an interface) then the code can be changed as well.
Personally I'm not familiar with testing libraries for Kotlin and would go with JUnit4 + AssertJ, though any other library can be used if its suitable and looks nice.
There are 4 REST endpoints in total, they should be covered by tests to ensure API contract. These tests should only validate the response format and if input is correctly read by the routes/controllers. The logic behind these routes should not be tested and should be mocked. If its impossible to mock something (for example the class is not
open
and doesn't implement an interface) then the code can be changed as well.Personally I'm not familiar with testing libraries for Kotlin and would go with JUnit4 + AssertJ, though any other library can be used if its suitable and looks nice.