Add tests for io handler