コード例 #1
0
 @Test
 public void cannotInitiateWithNullProcessor() {
   try {
     ProcessorChain.startWith(null);
     fail("No exception thrown!!");
   } catch (NullPointerException e) {
     assertEquals(e.getMessage(), BUNDLE.getMessage("processing.nullProcessor"));
   }
 }
コード例 #2
0
 @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"));
   }
 }