
plan = get_plan(memory)

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

# check generated elements
elements = list(get_elements(memory))
assert_equals(len(elements), 3) # 2 existant, 1 produced
captains = [v for v in elements if getattr(v, 'el_id', None) == 'captain']
assert_equals(len(captains), 2)
