step.requiredPlanState = PlanState.CREATED;
Plan p = new Plan();
p.getPlanProperties().setState(PlanState.PLAN_VALIDATED);
step.plan = p;
PrepareChangesForPersist prepareChangesForPersist = mock(PrepareChangesForPersist.class);
step.prepareChangesForPersist = prepareChangesForPersist;
EntityManager em = mock(EntityManager.class);
when(em.merge(p)).thenReturn(p);
step.em = em;