Unit testing is an important part of writing principled Kotlin programs. The org.junit.jupiter package provides the tools we need to write unit tests, and the gradle test command runs tests.
For the sake of demonstration, this code is in the default package, but it could be any package. Testing code typically lives in the same package as the code it tests.
To run all tests in the current project in verbose mode, you would typically use a build tool like Gradle:
To run benchmarks, you would need to set up JMH in your project and run it through Gradle or directly. The exact command would depend on your project setup.
Remember that Kotlin integrates well with Java, so you can often use Java testing and benchmarking tools directly in your Kotlin projects.