QMI Test code