@Test
public void shouldWrapIsClosedExceptionIntoRuntime() throws Exception {

  var cause = new IsClosedException();
  doThrow(cause).when(stateManager).trigger(any(), any(), any());
  Workflow workflow = Workflow.create("id", dockerWorkflowConfiguration(HOURS));
  var exception = assertThrows(
      RuntimeException.class,
      () -> trigger.event(workflow, NATURAL_TRIGGER, TIME, PARAMETERS)
  );
  assertThat(exception.getCause(), equalTo(cause));
}