Spring Boot 2.0 supports writing test classes for Kotlin component testing. This recipe will highlight how to test a RESTful service written in the Kotlin language.
Building tests for Kotlin components
Getting ready
Open the Spring Boot ch12-kotlin project and add a Kotlin test class.
How to do it...
Using Kotlin language, perform the following steps in implementing test cases for Kotlin request handlers:
- First, add the Kotlin-JUnit Maven dependency into the pom.xml file:
<dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId...