Test data was sent before the error-channel was added to the inbound adapter; the expected error could occur before the error-channel was in place and the test failed because the expected error message was absent. Move the error-channel setup to before the test data is sent.