### Question:
EventBasedStatusHolder implements StatusHolder { @Subscribe public void pause(final ScraperExecutionPausedEvent event) throws InterruptedException { try { monitor.enterWhen(pauseGuard); status = ScraperState.PAUSED; } finally { monitor.leave(); } } @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 pause() throws Exception { assertEquals("Unexpected status.", holder.getStatus(), ScraperState.RUNNING); holder.pause(null); assertEquals("Unexpected status.", holder.getStatus(), ScraperState.PAUSED); }