Added unit tests for query_sm, query_sm_resp, cancel_sm and cancel_sm_resp