RunState { private RunState transitionUpdates(Instant instant) { return new AutoValue_RunState( workflowInstance(), state(), instant.toEpochMilli(), data(), counter() + 1); }  abstract WorkflowInstance workflowInstance(); abstract State state(); abstract long timestamp(); abstract StateData data(); abstract long counter(); static RunState fresh(
      WorkflowInstance workflowInstance,
      Time time); static RunState fresh(WorkflowInstance workflowInstance); RunState transition(Event event, Time time); static RunState create(
      WorkflowInstance workflowInstance,
      State state); static RunState create(
      WorkflowInstance workflowInstance,
      State state,
      Instant timestamp); static RunState create(
      WorkflowInstance workflowInstance,
      State state,
      Instant timestamp,
      long counter); static RunState create(
      WorkflowInstance workflowInstance,
      State state,
      StateData stateData); static RunState create(
      WorkflowInstance workflowInstance,
      State state,
      StateData stateData,
      Instant timestamp); static RunState create(
      WorkflowInstance workflowInstance,
      State state,
      StateData stateData,
      Instant timestamp,
      long counter); static final int SUCCESS_EXIT_CODE; static final int MISSING_DEPS_EXIT_CODE; static final int UNRECOVERABLE_FAILURE_EXIT_CODE; static final int UNKNOWN_ERROR_EXIT_CODE; }
@Test public void testTransitionUpdates() { transitioner.initialize(RunState.fresh(WORKFLOW_INSTANCE)); transitioner.receive(eventFactory.triggerExecution(Trigger.natural())); verify(time).get(); assertThat(transitioner.get(WORKFLOW_INSTANCE).state(), equalTo(QUEUED)); assertThat(transitioner.get(WORKFLOW_INSTANCE).counter(), is(0L)); }