assertEquals(execution.getActiveSession().getState().getId(), execution2.getActiveSession().getState().getId());
}
public void testPutFlowExecutionNextSnapshotId() {
FlowExecution execution = executionFactory.createFlowExecution(flow);
execution.start(null, new MockExternalContext());
assertNotNull(execution.getKey());
repository.putFlowExecution(execution);
String key = execution.getKey().toString();
FlowExecutionKey parsedKey = repository.parseFlowExecutionKey(key);
FlowExecution execution2 = repository.getFlowExecution(parsedKey);
assertSame(execution.getDefinition(), execution2.getDefinition());
assertEquals(execution.getActiveSession().getState().getId(), execution2.getActiveSession().getState().getId());
MockExternalContext context = new MockExternalContext();
context.setEventId("foo");
execution2.resume(context);
repository.putFlowExecution(execution2);
assertNotSame(execution.getKey(), execution2.getKey());
}