I want to write a unit test for my Kotlin code and use junit/hamcrest matchers, I want to use the is method, but it is a reserved word in Kotlin.
is
How can I
In Kotlin, is is a reserved word . To get around this you need to escape the code using backticks, so the following will allow you to compile the code:
class testExample{ @Test fun example(){ assertThat(1, `is`(equalTo(1)) } }