title: Mokito throwing WrongTypeOfReturnValue
body: <p>Logic in implementation class is as shown below, I tried to write a mock and get exception as WrongTypeOfReturnValue</p>
  
  <pre><code>  /**
       * update audit and courier log when Provider sign the document.
       * @param cmsCourierInfo
       * @param documentInfo
       * @throws Exception
       */
      public boolean doAuditProviderESignCompletion(CMSCourierInfo cmsCourierInfo, DocumentInfo documentInfo) throws  Exception {
  
          String signerTitle = "";
          List&lt;ParticipantInfo&gt; participantInfos = documentInfo.getParticipants().getParticipantInfo();
          //First participant is Provider
          ParticipantInfo participantInfo = participantInfos.get(0);
  
          if(StringUtils.isNotEmpty(participantInfo.getTitle())){
              signerTitle = participantInfo.getTitle();
          }
          //update audit log with provider signed information
          CMSCourierContractManager.signContract(cmsCourierInfo.getGuidString(), participantInfo.getName(), signerTitle, null);
  
          //update audit log when document sent to Internal Signer
          return doAuditSentForInternalSigner(cmsCourierInfo.getDocumentKey(), documentInfo);
      }
  </code></pre>
  
  <p>Test </p>
  
  <pre><code>   @Test
     public void testUpdateContractStatus() throws Exception{
  
          String documentKey = "TestKey";
          cmsCourierInfo = mock(CMSCourierInfo.class);
          when(cmsFactoryManager.findCourier(anyString())).thenReturn(cmsCourierInfo);
          EchoSignDocumentServiceImpl echoSignDocumentService = spy(documentService);
          when(echoSignDocumentService.updateContractStatus(anyString())).thenReturn(true);
  
          doThrow(new RuntimeException()).when(echoSignDocumentService).updateContractStatus(anyString());
          boolean status = echoSignDocumentService.updateContractStatus(documentKey);
          Assert.assertEquals(true, status);
      }
  </code></pre>
  
  <p>Error that I get is </p>
  
  <pre><code>org.mockito.exceptions.misusing.WrongTypeOfReturnValue: 
  Boolean cannot be returned by findCourier()
  findCourier() should return CMSCourierInfo
  ***
  
  If you're unsure why you're getting above error read on.
  Due to the nature of the syntax above problem might occur because:
  1. This exception *might* occur in wrongly written multi-threaded tests.
     Please refer to Mockito FAQ on limitations of concurrency testing.
  2. A spy is stubbed using when(spy.foo()).then() syntax. It is safer to stub spies - 
     - with doReturn|Throw() family of methods. More in javadocs for Mockito.spy() method.
  
  
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
  at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
  at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
  at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
  at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
  at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
  at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
  at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
  at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
  at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
  at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
  at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
  at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
  at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
  at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
  at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)
  at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211)
  at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
  </code></pre>
  
  <p>Some inputs will be of great help</p>