I\'m using mockito with scalatest. I have following problem when using matcher with value class.
import org.scalat
My class also extended AnyVal
case class ApplicationKey(value: String) extends AnyVal {
override def toString: String = value
}
and this worked for me:
when(waterfallLogicEventWriter.writeAuctionEvents(
Eq(waterfallRequest.auctionId), Eq(waterfallRequest.ip),
ApplicationKey(any[String]),
any()).thenReturn(waterfallEvents)