AbstractProcessor implements Processor { @Override public final void init(@Nonnull Outbox outbox, @Nonnull Context context) throws Exception { this.outbox = outbox; this.logger = context.logger(); init(context); }  @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(expected = UnknownHostException.class) public void when_customInitThrows_then_initRethrows() throws Exception { new MockP().setInitError(new UnknownHostException()) .init(mock(Outbox.class), new TestProcessorContext()); }