When I try to run contract tests using SpecmaticJUnitSupport, I’m getting an exception saying that XYZ method or class is missing. What do I do?

Spring-boot declares Kotlin as a dependency, and so does Specmatic (Specmatic is written in Kotlin). The two versions may conflict, resulting in errors about missing methods or classes.

Maven properties in Spring projects

In a Spring 2.x or 3.x project, in case of errors about a missing Kotlin method/class which indicate a core Kotlin method/class or a coroutines-related method/class, add the following to the pom:



Remember: Update the version of kotlin-coroutines.version above with the latest version from


If similar errors appear after adding these properties, add the following dependency.