title: Match argument object that has a property equal to (using Mockk)
body: <p>I have looked around for a similar question, but cannot find a solution. </p>
  
  <p>I have a couple of instances to the same type of object. As a simple example, a Pen object. This class contains size (Int) and color (String) properties. I need to mock a function (such as calculatePrice) that takes in this type of object. I would like it to return a result <strong>based on one of the properties</strong>. </p>
  
  <pre><code>    every { calculatePrice(pen : Pen) } returns 3
      every { calculatePrice(pen2 : Pen) } returns 4
  </code></pre>
  
  <p>Because this call is nested within another function, I cannot guarantee that the address of the object is the same, so I am attempting to get around this by checking a property value, such as pen.size. If there is a way to make sure the <em>value</em> of the object is the same, not the reference, that would solve my problem too.</p>
  
  <p>Using Mockito, I would use argThat(pen -> pen.size() == 2)</p>
  
  <p>Any recommendations would be much appreciated.</p>