title: The method when(T) in the type Stubber is not applicable for the arguments (void)
body: <p>I am getting following error when stubbing a void: </p>
  
  <blockquote>
    <p>The method when(T) in the type Stubber is not applicable for the
    arguments (void)</p>
  </blockquote>
  
  <p>Here is my sample code:</p>
  
  <pre><code>doNothing().when(mockRegistrationPeristImpl.create(any(Registration.class)));
  
  public void create(final T record) throws DataAccessException {
      try {
          entityManager.persist(record);
          entityManager.flush();
      } catch (PersistenceException ex) {}
  }
  </code></pre>
  
  <p>What am I missing ?</p>