mmifw-tests : add connection wait helper function, state change wait helper function