When I introduced Ktor test to my test classpath: ...
# ktor
m
When I introduced Ktor test to my test classpath:
Copy code
@Test
    fun testRequest() = withTestApplication(Application::main) {
        with(handleRequest(HttpMethod.Get, "/")) {
            assertEquals(HttpStatusCode.OK, response.status())
            assertEquals("Test String", response.content)
        }
        with(handleRequest(HttpMethod.Get, "/index.html")) {
            assertFalse(requestHandled)
        }
    }
All my other tests started failing:
Copy code
java.lang.NoClassDefFoundError: Could not initialize class org.kotlinacademy.backend.Config
	at usecase.UseCaseTest.cleanUpMocks(UseCaseTest.kt:24)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
...
Config
is an object: https://github.com/MarcinMoskala/KotlinAcademyApp/blob/master/backend/src/org/kotlinacademy/backend/Config.kt Here are all by tests: https://github.com/MarcinMoskala/KotlinAcademyApp/tree/master/backend/test