title: Specify specific enum being passed into method in Mockito doReturn method
body: <p>I have a junit test in which I have an object mocked within a class. Let's call the class <code>Mocker</code> with the @Mock of MyManager called <code>mocker</code>.</p>
  
  <p>Example class:</p>
  
  <pre><code>public class Mocker {
     private MyManager myManager;
  
     public void myMethod() {
         String x = "test";
         final String result1 =  this.myManager.execute(dummyEnum.ENUM_A, x);
         final String result2 =  this.myManager.execute(dummyEnum.ENUM_B, x);
  
         if(result1 == true) {
             //Do something
         }
         if(result2 == true) {
             //Do something else
         }
     }
  
     public enum dummyEnum {
          ENUM_A,ENUM_B
     }
  }
  </code></pre>
  
  <p>My current junit test uses the following: <code>doReturn(null).when(mocker).execute(any(dummyEnum.class), anyObject());</code></p>
  
  <p>However, this will return null for both result1 &amp; result2. <strong>How can I specify that when execute() is executed with ENUM_A it returns a String of <code>Hello</code> and execute() with ENUM_B returns a String of <code>Goodbye</code></strong></p>
  
  <p>I have seen the <a href="https://stackoverflow.com/questions/19949762/mockito-how-to-match-any-enum-parameter">answer here</a> but I don't want to just say any instance of that class, I want to specify a certain enum from that class.</p>