Tests for reading and writing data.