@Test public void shouldNormalContextsOnlyExistInTransitionedAndNotMutateExisting() { assertThat(initialTransition.getContext().getContextsOfType(PinRechargedContext.class).size(), equalTo(0)); assertThat(transitioned.getContext().getContextsOfType(PinRechargedContext.class).size(), equalTo(1)); }
public Context getContext() { return context; }
Transition { public Context getContext() { return context; } }
Transition { public Context getContext() { return context; } @JsonCreator private  Transition(
            @JsonProperty("transitioned") LocalDateTime transitioned,
            @JsonProperty("state") String state,
            @JsonProperty("event") String event,
            @JsonProperty("previous") Transition previous,
            @JsonProperty("context") Context context); }
Transition { public Context getContext() { return context; } @JsonCreator private  Transition(
            @JsonProperty("transitioned") LocalDateTime transitioned,
            @JsonProperty("state") String state,
            @JsonProperty("event") String event,
            @JsonProperty("previous") Transition previous,
            @JsonProperty("context") Context context); static Transition initialTransition(String stateMachineId,
                                               Object initialState,
                                               List<Object> initialContexts); @JsonIgnore Optional<Transition> previous(); @JsonIgnore String getEvent(); @JsonIgnore Object getState(); LocalDateTime getTransitioned(); Context getContext(); @Override String toString(); static Transition To(Object state, Object event, Context context); static Transition To(Class<?> state, Object event, Context context); Transition setPrevious(Transition previous); }
Transition { public Context getContext() { return context; } @JsonCreator private  Transition(
            @JsonProperty("transitioned") LocalDateTime transitioned,
            @JsonProperty("state") String state,
            @JsonProperty("event") String event,
            @JsonProperty("previous") Transition previous,
            @JsonProperty("context") Context context); static Transition initialTransition(String stateMachineId,
                                               Object initialState,
                                               List<Object> initialContexts); @JsonIgnore Optional<Transition> previous(); @JsonIgnore String getEvent(); @JsonIgnore Object getState(); LocalDateTime getTransitioned(); Context getContext(); @Override String toString(); static Transition To(Object state, Object event, Context context); static Transition To(Class<?> state, Object event, Context context); Transition setPrevious(Transition previous);  }