### Question:
EventBasedStatusHolder implements StatusHolder { @Subscribe public void resume(final ScraperExecutionContinuedEvent event) throws InterruptedException { try { monitor.enterWhen(continueGuard); status = ScraperState.RUNNING; } 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 resume() throws Exception { ReflectionUtils.setFieldValue(holder, EventBasedStatusHolder.class.getDeclaredField("status"), ScraperState.PAUSED); assertEquals("Unexpected status.", holder.getStatus(), ScraperState.PAUSED); holder.resume(null); assertEquals("Unexpected status.", holder.getStatus(), ScraperState.RUNNING); }