title: Implicit options mock with mockito in scala
body: <p>I have a case class that consists of some Options. Let's say</p>
  
  <pre><code>case class Clazz(field: Option[String] = None)
  </code></pre>
  
  <p>I'm trying to mock this class in a scalatest spec to pass to another function. Like...</p>
  
  <pre><code>val clazz = mock[Clazz]
  </code></pre>
  
  <p>It makes field a <code>null</code>.</p>
  
  <p>Later this clazz is getting serialized into JSON with <a href="https://github.com/circe/circe" rel="nofollow noreferrer">circe.io</a> library and of course it fires an error: <code>scala.MatchError: null</code>. Because it expects option to be either <code>Some</code> or <code>None</code>.</p>
  
  <p>So my question is... How can I force <a href="http://site.mockito.org/" rel="nofollow noreferrer">mockito</a> to use None for Options instead of just nulls. Seems like it needs some sort of implicit stuff.</p>
  
  <p>Or maybe totally different approach?</p>
  
  <p>Thanks!</p>