Add tests for toggle reference and qdata