@Test
public void getHeaderValue_headerValueSet_returnValue() {

    // given
    HeaderName<Integer> contextHeader = HeaderName.forType(Integer.class, "contextId");
    Map<HeaderName<?>, Object> headers = ImmutableMap.of(contextHeader, 42);
    SagaExecutionTask task = new SagaExecutionTask(null, invoker, theMessage, headers, null);
    // when
    Optional<Integer> headerValue = task.getHeaderValue(contextHeader);
    // then
    assertThat("Expected provided header value to be available.", headerValue.get(), equalTo(42));
}