module { single { userController } } @Test fun `Return user data when called request with user id`() { val userId = UserId(1) every { userController.find(userId) } returns UserData(1, "ࢁాଠ") withTestApplication(Application::module) { startKoin { modules(module) } handleRequest(HttpMethod.Get, "/users/1").apply { assertThat(response.status()).isEqualTo(HttpStatusCode.OK) … } } } MockΦϒδΣΫτΛ࡞͠ɺKoinϞδϡʔϧʹొ MockΦϒδΣΫτ͕ݺΕͨ࣌ͷڍಈΛఆٛ KoinΛىಈ