@Test public void cannotInitiateWithNullProcessor() { try { ProcessorChain.startWith(null); fail("No exception thrown!!"); } catch (NullPointerException e) { assertEquals(e.getMessage(), BUNDLE.getMessage("processing.nullProcessor")); } }
@Test public void cannotChainWithNullProcessor() { @SuppressWarnings("unchecked") final Processor<MessageProvider, MessageProvider> p = mock(Processor.class); try { ProcessorChain.startWith(p).chainWith(null); fail("No exception thrown!!"); } catch (NullPointerException e) { assertEquals(e.getMessage(), BUNDLE.getMessage("processing.nullProcessor")); } }