private void legalTransition(TaskState state, SideEffect.Action... expectedActions) {
legalTransition(state, ImmutableSet.copyOf(expectedActions));
}
private void legalTransition(TaskState state, Set<SideEffect.Action> expectedActions) {
ScheduleStatus previousState = stateMachine.getPreviousState();
TransitionResult result = stateMachine.updateState(state.getStatus());
assertTrue("Transition to " + state + " was not successful", result.isSuccess());
assertNotEquals(previousState, stateMachine.getPreviousState());
assertEquals(
FluentIterable.from(expectedActions).transform(TO_SIDE_EFFECT).toSet(),