title: JMockit multiple exceptions as result for method call
body: <p>This is from the official JMockit Tutorial:</p>
  
  <pre><code>@Test
     public void doSomethingHandlesSomeCheckedException() throws Exception
     {
        new Expectations() {
           DependencyAbc abc;
  
           {
              abc.stringReturningMethod();
              returns("str1", "str2");
              result = new SomeCheckedException();
           }
        };
  
        new UnitUnderTest().doSomething();
     }
  </code></pre>
  
  <p>Is it possible to state the opposite, that is multiple results and one return - I need to throw 2 exceptions and only then return a good value. Something like this is what Im looking for:</p>
  
  <pre><code>  abc.stringReturningMethod();
    returns(new SomeCheckedException(), new SomeOtherException(),"third");
  </code></pre>
  
  <p>This doesn't work, JMockit can't cast those exceptions to <code>String</code> (which is the return type of <code>stringReturningMethod</code>)</p>