AbstractProcessor implements Processor { @Override @SuppressWarnings("checkstyle:magicnumber") public void process(int ordinal, @Nonnull Inbox inbox) { try { switch (ordinal) { case 0: process0(inbox); break; case 1: process1(inbox); break; case 2: process2(inbox); break; case 3: process3(inbox); break; case 4: process4(inbox); break; default: processAny(ordinal, inbox); } } catch (Exception e) { throw sneakyThrow(e); } }  @Override final void init(@Nonnull Outbox outbox, @Nonnull Context context); @Override final void restoreFromSnapshot(@Nonnull Inbox inbox); @Override @SuppressWarnings("checkstyle:magicnumber") void process(int ordinal, @Nonnull Inbox inbox); @Override boolean tryProcessWatermark(@Nonnull Watermark watermark);  }
@Test public void when_processInbox0_then_tryProcess0Called() { tryProcessP.process(ORDINAL_0, inbox); tryProcessP.validateReceptionOfItem(ORDINAL_0, MOCK_ITEM); }
@Test public void when_processInbox1_then_tryProcess1Called() { tryProcessP.process(ORDINAL_1, inbox); tryProcessP.validateReceptionOfItem(ORDINAL_1, MOCK_ITEM); }
@Test public void when_processInbox2_then_tryProcess2Called() { tryProcessP.process(ORDINAL_2, inbox); tryProcessP.validateReceptionOfItem(ORDINAL_2, MOCK_ITEM); }
@Test public void when_processInbox3_then_tryProcess3Called() { tryProcessP.process(ORDINAL_3, inbox); tryProcessP.validateReceptionOfItem(ORDINAL_3, MOCK_ITEM); }
@Test public void when_processInbox4_then_tryProcess4Called() { tryProcessP.process(ORDINAL_4, inbox); tryProcessP.validateReceptionOfItem(ORDINAL_4, MOCK_ITEM); }
@Test public void when_processInbox5_then_tryProcessCalled() { tryProcessP.process(ORDINAL_5, inbox); tryProcessP.validateReceptionOfItem(ORDINAL_5, MOCK_ITEM); }