title: Mocking void method with EasyMock and Mockito
body: <p>Hello I would like to know what is the best approach to mock void methods for example: I have a PersonManager under the test and then I have dao that is mocked.</p>
  
  <pre><code>class PersonManager {
  
      PersonDao dao...
  
      PersonManager(PersonDao dao)...
  
      Preson find(String person)...
  
      void delete(String person)...
  
  }
  
  class PersonManagerTest {
  
      Map&lt;String, Person&gt; persons ..... = "person1", "person2", "person3";
  
      PersonDao mock...
  
      PersonManager manager = new PersonManager(mock);
  
      //easy one
      @Test public void shouldReturnExistingPerson() {
          expect(mock.find("person1").andReturn(persons.get(0));
          Person result = manager.find("person1");
          // replay and verify logic
      }
  
      //but what should I do here?
      @Test public void shouldDeleteExistingPerson() {
          //should I remove a person from testing Map holding test data? or what am I doing wrong
      }
  }
  </code></pre>
  
  <p>So testing method with return was easy but how to toset void method? Thank you for suggestions, and Mcokito examples are welcomed too.
          }</p>