@Test
public void findSagaInstanceKey_sagaHasReaderWithExactMessage_returnsDefinedKey() {

    // given
    final String keyValue = "theKeyValue";
    KeyReader reader = FunctionKeyReader.create(String.class, new KeyReadFunction<String>() {
            @Override
            public String key(final String s) {
                return keyValue;
            }
        });
    when(testSaga.keyReaders()).thenReturn(Lists.newArrayList(reader));
    // when
    Object foundKey = sut.findSagaInstanceKey(Saga.class, SagaLookupContext.forMessage("my input event message"));
    // then
    assertThat("Expected returned key to match key value provided reader.", foundKey, equalTo((Object)keyValue));
}