add tests for writing AP data to disk, refs #637