@Test
public void shouldFailToReadWorkflow() throws Exception {

  when(transaction.workflow(HOURLY_WORKFLOW.id())).thenThrow(new IOException("read error"));
  try {
    workflowInitializer.store(HOURLY_WORKFLOW, PASS);
    fail();
  } catch (RuntimeException e) {
    assertEquals("read error", e.getCause().getMessage());
  }
}