some spec tests for document flow.