Simplifying tests to write and read back