@Test
public void findSagaInstanceKey_sagaHasBothReadesrWithInterfaceImplementedByMessageAndMessageClass_returnsDefinedKey() {

    // given
    final String keyValue = "theKeyValue";
    KeyReader reader = FunctionKeyReader.create(CharSequence.class, new KeyReadFunction<CharSequence>() {
        @Override
        public String key(final CharSequence charSequence) {
            return "some key";
        }
    });
    KeyReader stringReader = FunctionKeyReader.create(String.class, new KeyReadFunction<String>() {
        @Override
        public String key(final String string) {
            return keyValue;
        }
    });
    when(testSaga.keyReaders()).thenReturn(Lists.newArrayList(reader, stringReader));
    // 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));
}