@Test
public void testError() throws Exception {

	Exception targetException = new NullPointerException("FakeException");
	pipe.setSender(getElementRenderer(targetException));
	configurePipe();
	pipe.start();
	try {
		PipeRunResult prr = doPipe(pipe, messageError, session);
		fail("Expected exception to be thrown");
	} catch (Exception e) {
		assertThat(e.getMessage(),StringContains.containsString("(NullPointerException) FakeException"));
		assertCauseChainEndsAtOriginalException(targetException,e);
	}
}