@Test
public void shouldReturnANullHandlerWhenThereIsNoEncodingInitParameter() throws Exception {

when(context.getInitParameter(ENCODING)).thenReturn(null);

EncodingHandlerFactory handlerFactory = new EncodingHandlerFactory(context);
assertThat(handlerFactory.getInstance(), is(instanceOf(NullEncodingHandler.class)));
}