move read write tests to generic