@Test
public void getMaxSubsequentStateExecutionsReturnsValueDefinedForTheState() {

  int executionsDefault = 200;
  int executionsForBegin = 300;
  WorkflowSettings s = new WorkflowSettings.Builder().setMaxSubsequentStateExecutions(executionsDefault)
      .setMaxSubsequentStateExecutions(TestWorkflow.State.begin, executionsForBegin).build();
  assertThat(s.getMaxSubsequentStateExecutions(TestWorkflow.State.begin), is(equalTo(executionsForBegin)));
}