@Test
void shouldIncludeTheStacktraceInTheHeaderOfThePublishedMessage() {

	recoverer = new RepublishMessageRecoverer(amqpTemplate);
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	cause.printStackTrace(new PrintStream(baos));
	final String expectedHeaderValue = baos.toString();

	recoverer.recover(message, cause);

	assertThat(message.getMessageProperties().getHeaders().get("x-exception-stacktrace")).isEqualTo(expectedHeaderValue);
}