title: How to mock a new object using mockk
body: <p>I'm trying to write unit tests using mockk.</p>
  
  <p>I'm trying to figure out how to mock a new instance of an object.</p>
  
  <p>For example, using PowerMockito we would write:</p>
  
  <pre><code>PowerMockito.whenNew(Dog::class.java).withArguments("beagle").thenReturn(mockDog)
  </code></pre>
  
  <p>If the expected result of my test is mockDog, I want to be able to assert that it equals my actualResult:</p>
  
  <pre><code>assertEquals(mockDog, actualResult)
  </code></pre>
  
  <p>How would I accomplish this using mockk?</p>
  
  <p>Thanks in advance.</p>