### Question:
EventBasedStatusHolder implements StatusHolder { @Subscribe public void exit(final ScraperExecutionExitEvent event) { status = ScraperState.EXIT; } @Inject  EventBasedStatusHolder(final Monitor monitor); @Subscribe void pause(final ScraperExecutionPausedEvent event); @Subscribe void resume(final ScraperExecutionContinuedEvent event); @Subscribe void stop(final ScraperExecutionStoppedEvent event); @Subscribe void exit(final ScraperExecutionExitEvent event); ScraperState getStatus();  }### Answer:
@Test public void exit() throws Exception { assertEquals("Unexpected status.", holder.getStatus(), ScraperState.RUNNING); holder.exit(null); assertEquals("Unexpected status.", holder.getStatus(), ScraperState.EXIT); }