You can make the getter of the rule public like so:
@get: Rule var rule = PowerMockRule() Or you can mark it as a Java style field with the @JvmField annotation:
@JvmField @Rule var rule = PowerMockRule() You can find more details in this answer: http://stackoverflow.com/a/32827600/4465208https://stackoverflow.com/a/32827600/4465208
Ps. You should also consider making it a val if you don't intend on changing its value anywhere.