
plan = get_plan(memory)

# check plan state
assert_equals(plan.state, 'done')
# check steps'state
assert_equals(plan.elements['step1'].state, 'history')
assert_equals(plan.elements['step2'].state, 'history')
assert_equals(plan.elements['step3'].state, 'done')

# check generated elements
elements = list(get_elements(memory))
assert_equals(len(elements), 4) # two initially in memory + two produced
produced_elmts = [elmt for elmt in elements if elmt.identity]
assert_equals(len(produced_elmts), 2, produced_elmts)
assert produced_elmts[0].flag
assert produced_elmts[1].flag
