2 Replies Latest reply on Apr 14, 2016 11:28 AM by Mark Lybarger

    mock boolean return type

    Mark Lybarger Apprentice

      I'm having troubles with the test runner trying to mock a service interface that returns a boolean.

       

      I use the below ExchangeHandler, and the invocation goes fine,  I can step through and see handleMesage gets called, and the exchange.send gets invoked.  Then I get a NPE thrown when it tries to cast the return type. 

       

       

      public class EH implements ExchangeHandler {
           @Override
           public void handleMessage(Exchange exchange) {
                if exchange.getContract.getConsumerOperation.getName().equals("methodReturnsbool")) {
                     exchange.send(exchange.createMessage().setContent(true);
                }
      
           }
      }
      

       

      As I had control of the service and implementation, I modified this to a Boolean and it's working fine.  However, I just wanted to know if anyone else has knowledge of this limitation?  It seems the test runner, has problems converting a boolean result.  I'm on SY 1.x...