1 Reply Latest reply on Sep 18, 2012 10:05 AM by Gareth Healy

    No response found from route

    Gareth Healy Newbie

      I am testing a route, which i send in an object and get back an object. Its all test code so doesnt really do anything special. I have several tests, but 1 fails for an unknown reason. The one that fails is due to the exchange not returning a body - see below.

       

      CODE

      ####

      Exchange exchange = createExchangeWithBody(request);

      exchange.getIn().setHeader("operationName", "register");

       

      Exchange exchangeResponse = template.send(exchange);

      RegisterResponse response = exchangeResponse.getOut().getBody(RegisterResponse.class);

       

      Assert.assertTrue(exchangeResponse.hasOut()); ##PASS

      Assert.assertNotNull(response); ##FAIL

      ###

       

      Am a bit confused by this, am sure its because i've done something very silly but cant see what it is. I've attached an example.

       

      Cheers.

       

      Edited by: garethahealy on Sep 18, 2012 12:15 PM

       

      Edited by: garethahealy on Sep 18, 2012 12:16 PM

       

      Edited by: garethahealy on Sep 18, 2012 12:36 PM