@Test
  public void testErrorInPersistOnExit() {
    state.setMakeExceptionOnPersist(true);

    runBatchExpectNonZero();

    assertEquals("Expecting empty output", getOutput(), makeTerminalExpectedMessage());
  }
  @Test
  public void testUnexpectedMethodError() {
    runBatchExpectNonZero(AlternativeShellState.THROW_RUNTIME.getName());

    assertThat("Improper error report", getOutput(), containsString("Method execution error"));
  }