@Test
public void shouldReturnTextEncoderPassedIntoConstructor() {

    factory = new MockFactory(CUSTOM_DECODER, null);
    assertThat(factory.getDecoder(), is(notNullValue()));
    assertThat(factory.getDecoder(), is(sameInstance(CUSTOM_DECODER)));
}