• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include <gtest/gtest.h>
17 #include <libinput.h>
18 
19 #include "multimodal_input_connect_stub.h"
20 #include "mmi_service.h"
21 
22 #include "accesstoken_kit.h"
23 #include "nativetoken_kit.h"
24 #include "token_setproc.h"
25 namespace OHOS {
26 namespace MMI {
27 using namespace Security::AccessToken;
28 using Security::AccessToken::AccessTokenID;
29 namespace {
30 using namespace testing::ext;
31 uint64_t g_tokenID { 0 };
32 const std::string SYSTEM_BASIC { "system_basic" };
33 const char* g_basics[] = { "ohos.permission.COOPERATE_MANAGER" };
34 } // namespace
35 
36 class MultimodalInputConnectStubTest : public testing::Test {
37 public:
SetUpTestCase(void)38     static void SetUpTestCase(void) {}
TearDownTestCase(void)39     static void TearDownTestCase(void) {}
SetUp()40     void SetUp() {}
TearDown()41     void TearDown() {}
42     static void SetPermission(const std::string &level, const char** perms, size_t permAmount);
43 };
44 
SetPermission(const std::string & level,const char ** perms,size_t permAmount)45 void MultimodalInputConnectStubTest::SetPermission(const std::string &level, const char** perms, size_t permAmount)
46 {
47     if (perms == nullptr || permAmount == 0) {
48         return;
49     }
50 
51     NativeTokenInfoParams infoInstance = {
52         .dcapsNum = 0,
53         .permsNum = permAmount,
54         .aclsNum = 0,
55         .dcaps = nullptr,
56         .perms = perms,
57         .acls = nullptr,
58         .processName = "ConnectManagerTest",
59         .aplStr = level.c_str(),
60     };
61     g_tokenID = GetAccessTokenId(&infoInstance);
62     SetSelfTokenID(g_tokenID);
63     OHOS::Security::AccessToken::AccessTokenKit::AccessTokenKit::ReloadNativeTokenInfo();
64 }
65 
66 /**
67  * @tc.name: MultimodalInputConnectStubTest_StubSetMouseHotSpot
68  * @tc.desc: Test the function StubSetMouseHotSpot
69  * @tc.type: FUNC
70  * @tc.require:
71  */
72 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetMouseHotSpot, TestSize.Level1)
73 {
74     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
75     std::shared_ptr<MMIService> service = std::static_pointer_cast<MMIService>(stub);
76     service->state_ = ServiceRunningState::STATE_NOT_START;
77     MessageParcel data;
78     MessageParcel reply;
79     int32_t pid = 100;
80     int32_t windowId = -1;
81     int32_t hotSpotX = 300;
82     int32_t hotSpotY = 300;
83     data.WriteInt32(pid);
84     data.WriteInt32(windowId);
85     EXPECT_EQ(stub->StubSetMouseHotSpot(data, reply), MMISERVICE_NOT_RUNNING);
86     service->state_ = ServiceRunningState::STATE_RUNNING;
87     EXPECT_NE(stub->StubSetMouseHotSpot(data, reply), RET_OK);
88     windowId = 30;
89     data.WriteInt32(pid);
90     data.WriteInt32(windowId);
91     data.WriteInt32(hotSpotX);
92     data.WriteInt32(hotSpotY);
93     EXPECT_NE(stub->StubSetMouseHotSpot(data, reply), RET_OK);
94 }
95 
96 /**
97  * @tc.name: MultimodalInputConnectStubTest_StubGetMouseScrollRows
98  * @tc.desc: Test the function StubGetMouseScrollRows
99  * @tc.type: FUNC
100  * @tc.require:
101  */
102 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetMouseScrollRows, TestSize.Level1)
103 {
104     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
105     std::shared_ptr<MMIService> service = std::static_pointer_cast<MMIService>(stub);
106     service->state_ = ServiceRunningState::STATE_NOT_START;
107     MessageParcel data;
108     MessageParcel reply;
109     EXPECT_EQ(stub->StubGetMouseScrollRows(data, reply), MMISERVICE_NOT_RUNNING);
110 
111     service->state_ = ServiceRunningState::STATE_RUNNING;
112     EXPECT_NE(stub->StubGetMouseScrollRows(data, reply), RET_OK);
113 }
114 
115 /**
116  * @tc.name: MultimodalInputConnectStubTest_StubSetPointerSize
117  * @tc.desc: Test the function StubSetPointerSize
118  * @tc.type: FUNC
119  * @tc.require:
120  */
121 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetPointerSize, TestSize.Level1)
122 {
123     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
124     std::shared_ptr<MMIService> service = std::static_pointer_cast<MMIService>(stub);
125     service->state_ = ServiceRunningState::STATE_NOT_START;
126     MessageParcel data;
127     MessageParcel reply;
128     EXPECT_EQ(stub->StubSetPointerSize(data, reply), MMISERVICE_NOT_RUNNING);
129     int32_t size = 10;
130     data.WriteInt32(size);
131     service->state_ = ServiceRunningState::STATE_RUNNING;
132     EXPECT_NE(stub->StubSetPointerSize(data, reply), RET_OK);
133 }
134 
135 /**
136  * @tc.name: MultimodalInputConnectStubTest_StubSetNapStatus
137  * @tc.desc: Test the function StubSetNapStatus
138  * @tc.type: FUNC
139  * @tc.require:
140  */
141 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetNapStatus, TestSize.Level1)
142 {
143     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
144     std::shared_ptr<MMIService> service = std::static_pointer_cast<MMIService>(stub);
145     service->state_ = ServiceRunningState::STATE_NOT_START;
146     MessageParcel data;
147     MessageParcel reply;
148     EXPECT_EQ(stub->StubSetNapStatus(data, reply), MMISERVICE_NOT_RUNNING);
149 
150     int32_t pid = 1000;
151     int32_t uid = 1500;
152     std::string bundleName = "abc";
153     int32_t napStatus = 100;
154     data.WriteInt32(pid);
155     data.WriteInt32(uid);
156     data.WriteString(bundleName);
157     data.WriteInt32(napStatus);
158     service->state_ = ServiceRunningState::STATE_RUNNING;
159     EXPECT_NE(stub->StubSetNapStatus(data, reply), RET_OK);
160 }
161 
162 /**
163  * @tc.name: MultimodalInputConnectStubTest_StubGetPointerSize
164  * @tc.desc: Test the function StubGetPointerSize
165  * @tc.type: FUNC
166  * @tc.require:
167  */
168 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetPointerSize, TestSize.Level1)
169 {
170     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
171     std::shared_ptr<MMIService> service = std::static_pointer_cast<MMIService>(stub);
172     service->state_ = ServiceRunningState::STATE_NOT_START;
173     MessageParcel data;
174     MessageParcel reply;
175     EXPECT_EQ(stub->StubGetPointerSize(data, reply), MMISERVICE_NOT_RUNNING);
176 
177     service->state_ = ServiceRunningState::STATE_RUNNING;
178     EXPECT_NE(stub->StubGetPointerSize(data, reply), RET_OK);
179 }
180 
181 /**
182  * @tc.name: MultimodalInputConnectStubTest_StubSetMousePrimaryButton
183  * @tc.desc: Test the function StubSetMousePrimaryButton
184  * @tc.type: FUNC
185  * @tc.require:
186  */
187 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetMousePrimaryButton, TestSize.Level1)
188 {
189     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
190     MessageParcel data;
191     MessageParcel reply;
192     int32_t primaryButton = 2072;
193     data.WriteInt32(primaryButton);
194     EXPECT_NE(stub->StubSetMousePrimaryButton(data, reply), RET_OK);
195 }
196 
197 /**
198  * @tc.name: MultimodalInputConnectStubTest_StubSetHoverScrollState
199  * @tc.desc: Test the function StubSetHoverScrollState
200  * @tc.type: FUNC
201  * @tc.require:
202  */
203 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetHoverScrollState, TestSize.Level1)
204 {
205     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
206     MessageParcel data;
207     MessageParcel reply;
208     bool state = false;
209     data.WriteBool(state);
210     EXPECT_NE(stub->StubSetHoverScrollState(data, reply), RET_OK);
211 }
212 
213 /**
214  * @tc.name: MultimodalInputConnectStubTest_StubSetPointerVisible
215  * @tc.desc: Test the function StubSetPointerVisible
216  * @tc.type: FUNC
217  * @tc.require:
218  */
219 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetPointerVisible, TestSize.Level1)
220 {
221     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
222     MessageParcel data;
223     MessageParcel reply;
224     bool visible = true;
225     int32_t priority = 1;
226     data.WriteBool(visible);
227     data.WriteInt32(priority);
228     EXPECT_NE(stub->StubSetPointerVisible(data, reply), RET_OK);
229 }
230 
231 /**
232  * @tc.name: MultimodalInputConnectStubTest_StubMarkProcessed
233  * @tc.desc: Test the function StubMarkProcessed
234  * @tc.type: FUNC
235  * @tc.require:
236  */
237 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubMarkProcessed, TestSize.Level1)
238 {
239     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
240     std::shared_ptr<MMIService> service = std::static_pointer_cast<MMIService>(stub);
241     service->state_ = ServiceRunningState::STATE_NOT_START;
242     MessageParcel data;
243     MessageParcel reply;
244     EXPECT_NE(stub->StubMarkProcessed(data, reply), RET_OK);
245 
246     int32_t eventType = 1;
247     int32_t eventId = 100;
248     data.WriteInt32(eventType);
249     data.WriteInt32(eventId);
250     service->state_ = ServiceRunningState::STATE_RUNNING;
251     EXPECT_NE(stub->StubMarkProcessed(data, reply), RET_OK);
252 }
253 
254 /**
255  * @tc.name: MultimodalInputConnectStubTest_StubSetPointerColor
256  * @tc.desc: Test the function StubSetPointerColor
257  * @tc.type: FUNC
258  * @tc.require:
259  */
260 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetPointerColor, TestSize.Level1)
261 {
262     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
263     std::shared_ptr<MMIService> service = std::static_pointer_cast<MMIService>(stub);
264     service->state_ = ServiceRunningState::STATE_NOT_START;
265     MessageParcel data;
266     MessageParcel reply;
267     EXPECT_NE(stub->StubSetPointerColor(data, reply), RET_OK);
268 
269     int32_t color = 123456;
270     data.WriteInt32(color);
271     service->state_ = ServiceRunningState::STATE_RUNNING;
272     EXPECT_NE(stub->StubSetPointerColor(data, reply), RET_OK);
273 }
274 
275 /**
276  * @tc.name: MultimodalInputConnectStubTest_StubGetPointerColor
277  * @tc.desc: Test the function StubGetPointerColor
278  * @tc.type: FUNC
279  * @tc.require:
280  */
281 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetPointerColor, TestSize.Level1)
282 {
283     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
284     std::shared_ptr<MMIService> service = std::static_pointer_cast<MMIService>(stub);
285     service->state_ = ServiceRunningState::STATE_NOT_START;
286     MessageParcel data;
287     MessageParcel reply;
288     EXPECT_NE(stub->StubGetPointerColor(data, reply), RET_OK);
289     service->state_ = ServiceRunningState::STATE_RUNNING;
290     EXPECT_NE(stub->StubGetPointerColor(data, reply), RET_OK);
291 }
292 
293 /**
294  * @tc.name: MultimodalInputConnectStubTest_StubAddInputHandler
295  * @tc.desc: Test the function StubAddInputHandler
296  * @tc.type: FUNC
297  * @tc.require:
298  */
299 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubAddInputHandler, TestSize.Level1)
300 {
301     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
302     std::shared_ptr<MMIService> service = std::static_pointer_cast<MMIService>(stub);
303     service->state_ = ServiceRunningState::STATE_NOT_START;
304     MessageParcel data;
305     MessageParcel reply;
306     EXPECT_NE(stub->StubAddInputHandler(data, reply), RET_OK);
307 
308     int32_t handlerType = InputHandlerType::NONE;
309     uint32_t eventType = 0x1;
310     int32_t priority = 1;
311     uint32_t deviceTags = 100;
312     data.WriteInt32(handlerType);
313     data.WriteUint32(eventType);
314     data.WriteInt32(priority);
315     data.WriteUint32(deviceTags);
316     service->state_ = ServiceRunningState::STATE_RUNNING;
317     EXPECT_NE(stub->StubAddInputHandler(data, reply), RET_OK);
318 }
319 
320 /**
321  * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_001
322  * @tc.desc: Test the function OnRemoteRequest
323  * @tc.type: FUNC
324  * @tc.require:
325  */
326 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_001, TestSize.Level1)
327 {
328     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
329     MessageParcel data;
330     MessageParcel reply;
331     MessageOption option;
332     uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::ALLOC_SOCKET_FD);
333     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
334     int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
335     int32_t temp = stub->StubHandleAllocSocketFd(data, reply);
336     EXPECT_EQ(ret, temp);
337     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::ADD_INPUT_EVENT_FILTER);
338     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
339     ret = stub->OnRemoteRequest(code, data, reply, option);
340     temp = stub->StubAddInputEventFilter(data, reply);
341     EXPECT_EQ(ret, temp);
342     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::RMV_INPUT_EVENT_FILTER);
343     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
344     ret = stub->OnRemoteRequest(code, data, reply, option);
345     temp = stub->StubRemoveInputEventFilter(data, reply);
346     EXPECT_EQ(ret, temp);
347     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_MOUSE_SCROLL_ROWS);
348     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
349     ret = stub->OnRemoteRequest(code, data, reply, option);
350     temp = stub->StubSetMouseScrollRows(data, reply);
351     EXPECT_EQ(ret, temp);
352     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_MOUSE_SCROLL_ROWS);
353     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
354     ret = stub->OnRemoteRequest(code, data, reply, option);
355     temp = stub->StubGetMouseScrollRows(data, reply);
356     EXPECT_EQ(ret, temp);
357     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_POINTER_SIZE);
358     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
359     ret = stub->OnRemoteRequest(code, data, reply, option);
360     temp = stub->StubSetPointerSize(data, reply);
361     EXPECT_EQ(ret, temp);
362     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_POINTER_SIZE);
363     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
364     ret = stub->OnRemoteRequest(code, data, reply, option);
365     temp = stub->StubGetPointerSize(data, reply);
366     EXPECT_EQ(ret, temp);
367     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_CUSTOM_CURSOR);
368     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
369     ret = stub->OnRemoteRequest(code, data, reply, option);
370     temp = stub->StubSetCustomCursor(data, reply);
371     EXPECT_EQ(ret, temp);
372 }
373 
374 /**
375  * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_002
376  * @tc.desc: Test the function OnRemoteRequest
377  * @tc.type: FUNC
378  * @tc.require:
379  */
380 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_002, TestSize.Level1)
381 {
382     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
383     MessageParcel data;
384     MessageParcel reply;
385     MessageOption option;
386     uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_MOUSE_ICON);
387     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
388     int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
389     int32_t temp = stub->StubSetMouseIcon(data, reply);
390     EXPECT_EQ(ret, temp);
391     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_MOUSE_PRIMARY_BUTTON);
392     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
393     ret = stub->OnRemoteRequest(code, data, reply, option);
394     temp = stub->StubSetMousePrimaryButton(data, reply);
395     EXPECT_EQ(ret, temp);
396     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_MOUSE_PRIMARY_BUTTON);
397     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
398     ret = stub->OnRemoteRequest(code, data, reply, option);
399     temp = stub->StubGetMousePrimaryButton(data, reply);
400     EXPECT_EQ(ret, temp);
401     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_HOVER_SCROLL_STATE);
402     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
403     ret = stub->OnRemoteRequest(code, data, reply, option);
404     temp = stub->StubSetHoverScrollState(data, reply);
405     EXPECT_EQ(ret, temp);
406     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_HOVER_SCROLL_STATE);
407     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
408     ret = stub->OnRemoteRequest(code, data, reply, option);
409     temp = stub->StubGetHoverScrollState(data, reply);
410     EXPECT_EQ(ret, temp);
411     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_POINTER_VISIBLE);
412     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
413     ret = stub->OnRemoteRequest(code, data, reply, option);
414     temp = stub->StubSetPointerVisible(data, reply);
415     EXPECT_EQ(ret, temp);
416     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_POINTER_STYLE);
417     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
418     ret = stub->OnRemoteRequest(code, data, reply, option);
419     temp = stub->StubSetPointerStyle(data, reply);
420     EXPECT_EQ(ret, temp);
421     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::NOTIFY_NAP_ONLINE);
422     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
423     ret = stub->OnRemoteRequest(code, data, reply, option);
424     temp = stub->StubNotifyNapOnline(data, reply);
425     EXPECT_EQ(ret, temp);
426 }
427 
428 /**
429  * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_003
430  * @tc.desc: Test the function OnRemoteRequest
431  * @tc.type: FUNC
432  * @tc.require:
433  */
434 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_003, TestSize.Level1)
435 {
436     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
437     MessageParcel data;
438     MessageParcel reply;
439     MessageOption option;
440     uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::RMV_INPUT_EVENT_OBSERVER);
441     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
442     int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
443     int32_t temp = stub->StubRemoveInputEventObserver(data, reply);
444     EXPECT_EQ(ret, temp);
445     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_NAP_STATUS);
446     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
447     ret = stub->OnRemoteRequest(code, data, reply, option);
448     temp = stub->StubSetNapStatus(data, reply);
449     EXPECT_EQ(ret, temp);
450     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::CLEAN_WIDNOW_STYLE);
451     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
452     ret = stub->OnRemoteRequest(code, data, reply, option);
453     temp = stub->StubClearWindowPointerStyle(data, reply);
454     EXPECT_EQ(ret, temp);
455     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_POINTER_STYLE);
456     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
457     ret = stub->OnRemoteRequest(code, data, reply, option);
458     temp = stub->StubGetPointerStyle(data, reply);
459     EXPECT_EQ(ret, temp);
460     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::IS_POINTER_VISIBLE);
461     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
462     ret = stub->OnRemoteRequest(code, data, reply, option);
463     temp = stub->StubIsPointerVisible(data, reply);
464     EXPECT_EQ(ret, temp);
465     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::REGISTER_DEV_MONITOR);
466     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
467     ret = stub->OnRemoteRequest(code, data, reply, option);
468     temp = stub->StubRegisterInputDeviceMonitor(data, reply);
469     EXPECT_EQ(ret, temp);
470     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::REGISTER_DEV_MONITOR);
471     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
472     ret = stub->OnRemoteRequest(code, data, reply, option);
473     temp = stub->StubRegisterInputDeviceMonitor(data, reply);
474     EXPECT_EQ(ret, temp);
475     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::UNREGISTER_DEV_MONITOR);
476     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
477     ret = stub->OnRemoteRequest(code, data, reply, option);
478     temp = stub->StubUnregisterInputDeviceMonitor(data, reply);
479     EXPECT_EQ(ret, temp);
480 }
481 
482 /**
483  * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_004
484  * @tc.desc: Test the function OnRemoteRequest
485  * @tc.type: FUNC
486  * @tc.require:
487  */
488 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_004, TestSize.Level1)
489 {
490     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
491     MessageParcel data;
492     MessageParcel reply;
493     MessageOption option;
494     uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_DEVICE_IDS);
495     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
496     int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
497     int32_t temp = stub->StubGetDeviceIds(data, reply);
498     EXPECT_EQ(ret, temp);
499     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_DEVICE);
500     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
501     ret = stub->OnRemoteRequest(code, data, reply, option);
502     temp = stub->StubGetDevice(data, reply);
503     EXPECT_EQ(ret, temp);
504     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SUPPORT_KEYS);
505     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
506     ret = stub->OnRemoteRequest(code, data, reply, option);
507     temp = stub->StubSupportKeys(data, reply);
508     EXPECT_EQ(ret, temp);
509     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_KEYBOARD_TYPE);
510     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
511     ret = stub->OnRemoteRequest(code, data, reply, option);
512     temp = stub->StubGetKeyboardType(data, reply);
513     EXPECT_EQ(ret, temp);
514     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_POINTER_COLOR);
515     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
516     ret = stub->OnRemoteRequest(code, data, reply, option);
517     temp = stub->StubSetPointerColor(data, reply);
518     EXPECT_EQ(ret, temp);
519     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_POINTER_COLOR);
520     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
521     ret = stub->OnRemoteRequest(code, data, reply, option);
522     temp = stub->StubGetPointerColor(data, reply);
523     EXPECT_EQ(ret, temp);
524     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_POINTER_SPEED);
525     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
526     ret = stub->OnRemoteRequest(code, data, reply, option);
527     temp = stub->StubSetPointerSpeed(data, reply);
528     EXPECT_EQ(ret, temp);
529     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_POINTER_SPEED);
530     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
531     ret = stub->OnRemoteRequest(code, data, reply, option);
532     temp = stub->StubGetPointerSpeed(data, reply);
533     EXPECT_EQ(ret, temp);
534 }
535 
536 /**
537  * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_005
538  * @tc.desc: Test the function OnRemoteRequest
539  * @tc.type: FUNC
540  * @tc.require:
541  */
542 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_005, TestSize.Level1)
543 {
544     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
545     MessageParcel data;
546     MessageParcel reply;
547     MessageOption option;
548     uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SUBSCRIBE_KEY_EVENT);
549     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
550     int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
551     int32_t temp = stub->StubSubscribeKeyEvent(data, reply);
552     EXPECT_EQ(ret, temp);
553     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::UNSUBSCRIBE_KEY_EVENT);
554     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
555     ret = stub->OnRemoteRequest(code, data, reply, option);
556     temp = stub->StubUnsubscribeKeyEvent(data, reply);
557     EXPECT_EQ(ret, temp);
558     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SUBSCRIBE_SWITCH_EVENT);
559     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
560     ret = stub->OnRemoteRequest(code, data, reply, option);
561     temp = stub->StubSubscribeSwitchEvent(data, reply);
562     EXPECT_EQ(ret, temp);
563     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::UNSUBSCRIBE_SWITCH_EVENT);
564     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
565     ret = stub->OnRemoteRequest(code, data, reply, option);
566     temp = stub->StubUnsubscribeSwitchEvent(data, reply);
567     EXPECT_EQ(ret, temp);
568     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::MARK_PROCESSED);
569     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
570     ret = stub->OnRemoteRequest(code, data, reply, option);
571     temp = stub->StubMarkProcessed(data, reply);
572     EXPECT_EQ(ret, temp);
573     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::ADD_INPUT_HANDLER);
574     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
575     ret = stub->OnRemoteRequest(code, data, reply, option);
576     temp = stub->StubAddInputHandler(data, reply);
577     EXPECT_EQ(ret, temp);
578     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::REMOVE_INPUT_HANDLER);
579     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
580     ret = stub->OnRemoteRequest(code, data, reply, option);
581     temp = stub->StubRemoveInputHandler(data, reply);
582     EXPECT_EQ(ret, temp);
583     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::MARK_EVENT_CONSUMED);
584     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
585     ret = stub->OnRemoteRequest(code, data, reply, option);
586     temp = stub->StubMarkEventConsumed(data, reply);
587     EXPECT_EQ(ret, temp);
588 }
589 
590 /**
591  * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_006
592  * @tc.desc: Test the function OnRemoteRequest
593  * @tc.type: FUNC
594  * @tc.require:
595  */
596 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_006, TestSize.Level1)
597 {
598     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
599     MessageParcel data;
600     MessageParcel reply;
601     MessageOption option;
602     uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::MOVE_MOUSE);
603     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
604     int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
605     int32_t temp = stub->StubMoveMouseEvent(data, reply);
606     EXPECT_EQ(ret, temp);
607     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::INJECT_KEY_EVENT);
608     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
609     ret = stub->OnRemoteRequest(code, data, reply, option);
610     temp = stub->StubInjectKeyEvent(data, reply);
611     EXPECT_EQ(ret, temp);
612     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::INJECT_POINTER_EVENT);
613     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
614     ret = stub->OnRemoteRequest(code, data, reply, option);
615     temp = stub->StubInjectPointerEvent(data, reply);
616     EXPECT_EQ(ret, temp);
617     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_ANR_OBSERVER);
618     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
619     ret = stub->OnRemoteRequest(code, data, reply, option);
620     temp = stub->StubSetAnrListener(data, reply);
621     EXPECT_EQ(ret, temp);
622     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_DISPLAY_BIND_INFO);
623     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
624     ret = stub->OnRemoteRequest(code, data, reply, option);
625     temp = stub->StubGetDisplayBindInfo(data, reply);
626     EXPECT_EQ(ret, temp);
627     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_ALL_NAPSTATUS_DATA);
628     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
629     ret = stub->OnRemoteRequest(code, data, reply, option);
630     temp = stub->StubGetAllMmiSubscribedEvents(data, reply);
631     EXPECT_EQ(ret, temp);
632     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_DISPLAY_BIND);
633     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
634     ret = stub->OnRemoteRequest(code, data, reply, option);
635     temp = stub->StubSetDisplayBind(data, reply);
636     EXPECT_EQ(ret, temp);
637     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_FUNCTION_KEY_STATE);
638     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
639     ret = stub->OnRemoteRequest(code, data, reply, option);
640     temp = stub->StubGetFunctionKeyState(data, reply);
641     EXPECT_EQ(ret, temp);
642 }
643 
644 /**
645  * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_007
646  * @tc.desc: Test the function OnRemoteRequest
647  * @tc.type: FUNC
648  * @tc.require:
649  */
650 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_007, TestSize.Level1)
651 {
652     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
653     MessageParcel data;
654     MessageParcel reply;
655     MessageOption option;
656     uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_FUNCTION_KEY_STATE);
657     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
658     int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
659     int32_t temp = stub->StubSetFunctionKeyState(data, reply);
660     EXPECT_EQ(ret, temp);
661     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_POINTER_LOCATION);
662     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
663     ret = stub->OnRemoteRequest(code, data, reply, option);
664     temp = stub->StubSetPointerLocation(data, reply);
665     EXPECT_EQ(ret, temp);
666     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_CAPTURE_MODE);
667     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
668     ret = stub->OnRemoteRequest(code, data, reply, option);
669     temp = stub->StubSetMouseCaptureMode(data, reply);
670     EXPECT_EQ(ret, temp);
671     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_WINDOW_PID);
672     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
673     ret = stub->OnRemoteRequest(code, data, reply, option);
674     temp = stub->StubGetWindowPid(data, reply);
675     EXPECT_EQ(ret, temp);
676     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::APPEND_EXTRA_DATA);
677     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
678     ret = stub->OnRemoteRequest(code, data, reply, option);
679     temp = stub->StubAppendExtraData(data, reply);
680     EXPECT_EQ(ret, temp);
681     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::ENABLE_INPUT_DEVICE);
682     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
683     ret = stub->OnRemoteRequest(code, data, reply, option);
684     temp = stub->StubEnableInputDevice(data, reply);
685     EXPECT_EQ(ret, temp);
686     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::ENABLE_COMBINE_KEY);
687     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
688     ret = stub->OnRemoteRequest(code, data, reply, option);
689     temp = stub->StubEnableCombineKey(data, reply);
690     EXPECT_EQ(ret, temp);
691     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_KEY_DOWN_DURATION);
692     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
693     ret = stub->OnRemoteRequest(code, data, reply, option);
694     temp = stub->StubSetKeyDownDuration(data, reply);
695     EXPECT_EQ(ret, temp);
696 }
697 
698 /**
699  * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_008
700  * @tc.desc: Test the function OnRemoteRequest
701  * @tc.type: FUNC
702  * @tc.require:
703  */
704 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_008, TestSize.Level1)
705 {
706     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
707     MessageParcel data;
708     MessageParcel reply;
709     MessageOption option;
710     uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_TP_SCROLL_SWITCH);
711     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
712     int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
713     int32_t temp = stub->StubSetTouchpadScrollSwitch(data, reply);
714     EXPECT_EQ(ret, temp);
715     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_TP_SCROLL_SWITCH);
716     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
717     ret = stub->OnRemoteRequest(code, data, reply, option);
718     temp = stub->StubGetTouchpadScrollSwitch(data, reply);
719     EXPECT_EQ(ret, temp);
720     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_TP_SCROLL_DIRECT_SWITCH);
721     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
722     ret = stub->OnRemoteRequest(code, data, reply, option);
723     temp = stub->StubSetTouchpadScrollDirection(data, reply);
724     EXPECT_EQ(ret, temp);
725     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_TP_SCROLL_DIRECT_SWITCH);
726     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
727     ret = stub->OnRemoteRequest(code, data, reply, option);
728     temp = stub->StubGetTouchpadScrollDirection(data, reply);
729     EXPECT_EQ(ret, temp);
730     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_TP_TAP_SWITCH);
731     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
732     ret = stub->OnRemoteRequest(code, data, reply, option);
733     temp = stub->StubSetTouchpadTapSwitch(data, reply);
734     EXPECT_EQ(ret, temp);
735     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_TP_TAP_SWITCH);
736     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
737     ret = stub->OnRemoteRequest(code, data, reply, option);
738     temp = stub->StubGetTouchpadTapSwitch(data, reply);
739     EXPECT_EQ(ret, temp);
740     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_TP_POINTER_SPEED);
741     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
742     ret = stub->OnRemoteRequest(code, data, reply, option);
743     temp = stub->StubSetTouchpadPointerSpeed(data, reply);
744     EXPECT_EQ(ret, temp);
745     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_TP_POINTER_SPEED);
746     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
747     ret = stub->OnRemoteRequest(code, data, reply, option);
748     temp = stub->StubGetTouchpadPointerSpeed(data, reply);
749     EXPECT_EQ(ret, temp);
750 }
751 
752 /**
753  * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_009
754  * @tc.desc: Test the function OnRemoteRequest
755  * @tc.type: FUNC
756  * @tc.require:
757  */
758 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_009, TestSize.Level1)
759 {
760     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
761     MessageParcel data;
762     MessageParcel reply;
763     MessageOption option;
764     uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_KEYBOARD_REPEAT_DELAY);
765     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
766     int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
767     int32_t temp = stub->StubSetKeyboardRepeatDelay(data, reply);
768     EXPECT_EQ(ret, temp);
769     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_KEYBOARD_REPEAT_RATE);
770     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
771     ret = stub->OnRemoteRequest(code, data, reply, option);
772     temp = stub->StubSetKeyboardRepeatRate(data, reply);
773     EXPECT_EQ(ret, temp);
774     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_TP_PINCH_SWITCH);
775     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
776     ret = stub->OnRemoteRequest(code, data, reply, option);
777     temp = stub->StubSetTouchpadPinchSwitch(data, reply);
778     EXPECT_EQ(ret, temp);
779     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_TP_PINCH_SWITCH);
780     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
781     ret = stub->OnRemoteRequest(code, data, reply, option);
782     temp = stub->StubGetTouchpadPinchSwitch(data, reply);
783     EXPECT_EQ(ret, temp);
784     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_TP_SWIPE_SWITCH);
785     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
786     ret = stub->OnRemoteRequest(code, data, reply, option);
787     temp = stub->StubSetTouchpadSwipeSwitch(data, reply);
788     EXPECT_EQ(ret, temp);
789     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_TP_SWIPE_SWITCH);
790     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
791     ret = stub->OnRemoteRequest(code, data, reply, option);
792     temp = stub->StubGetTouchpadSwipeSwitch(data, reply);
793     EXPECT_EQ(ret, temp);
794     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_TP_RIGHT_CLICK_TYPE);
795     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
796     ret = stub->OnRemoteRequest(code, data, reply, option);
797     temp = stub->StubSetTouchpadRightClickType(data, reply);
798     EXPECT_EQ(ret, temp);
799     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_TP_RIGHT_CLICK_TYPE);
800     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
801     ret = stub->OnRemoteRequest(code, data, reply, option);
802     temp = stub->StubGetTouchpadRightClickType(data, reply);
803     EXPECT_EQ(ret, temp);
804 }
805 
806 /**
807  * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_010
808  * @tc.desc: Test the function OnRemoteRequest
809  * @tc.type: FUNC
810  * @tc.require:
811  */
812 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_010, TestSize.Level1)
813 {
814     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
815     MessageParcel data;
816     MessageParcel reply;
817     MessageOption option;
818     uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_TP_ROTATE_SWITCH);
819     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
820     int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
821     int32_t temp = stub->StubSetTouchpadRotateSwitch(data, reply);
822     EXPECT_EQ(ret, temp);
823     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_TP_ROTATE_SWITCH);
824     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
825     ret = stub->OnRemoteRequest(code, data, reply, option);
826     temp = stub->StubGetTouchpadRotateSwitch(data, reply);
827     EXPECT_EQ(ret, temp);
828     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_KEYBOARD_REPEAT_DELAY);
829     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
830     ret = stub->OnRemoteRequest(code, data, reply, option);
831     temp = stub->StubGetKeyboardRepeatDelay(data, reply);
832     EXPECT_EQ(ret, temp);
833     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_KEYBOARD_REPEAT_RATE);
834     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
835     ret = stub->OnRemoteRequest(code, data, reply, option);
836     temp = stub->StubGetKeyboardRepeatRate(data, reply);
837     EXPECT_EQ(ret, temp);
838     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_MOUSE_HOT_SPOT);
839     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
840     ret = stub->OnRemoteRequest(code, data, reply, option);
841     temp = stub->StubSetMouseHotSpot(data, reply);
842     EXPECT_EQ(ret, temp);
843     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_SHIELD_STATUS);
844     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
845     ret = stub->OnRemoteRequest(code, data, reply, option);
846     temp = stub->StubSetShieldStatus(data, reply);
847     EXPECT_EQ(ret, temp);
848     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_SHIELD_STATUS);
849     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
850     ret = stub->OnRemoteRequest(code, data, reply, option);
851     temp = stub->StubGetShieldStatus(data, reply);
852     EXPECT_EQ(ret, temp);
853     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_KEY_STATE);
854     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
855     ret = stub->OnRemoteRequest(code, data, reply, option);
856     temp = stub->StubGetKeyState(data, reply);
857     EXPECT_EQ(ret, temp);
858 }
859 
860 /**
861  * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_011
862  * @tc.desc: Test the function OnRemoteRequest
863  * @tc.type: FUNC
864  * @tc.require:
865  */
866 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_011, TestSize.Level1)
867 {
868     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
869     MessageParcel data;
870     MessageParcel reply;
871     MessageOption option;
872     uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::NATIVE_AUTHORIZE);
873     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
874     int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
875     int32_t temp = stub->StubAuthorize(data, reply);
876     EXPECT_EQ(ret, temp);
877     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::NATIVE_CANCEL_INJECTION);
878     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
879     ret = stub->OnRemoteRequest(code, data, reply, option);
880     temp = stub->StubCancelInjection(data, reply);
881     EXPECT_EQ(ret, temp);
882     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::NATIVE_INFRARED_OWN);
883     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
884     ret = stub->OnRemoteRequest(code, data, reply, option);
885     temp = stub->StubHasIrEmitter(data, reply);
886     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::NATIVE_INFRARED_FREQUENCY);
887     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
888     ret = stub->OnRemoteRequest(code, data, reply, option);
889     temp = stub->StubGetInfraredFrequencies(data, reply);
890     EXPECT_EQ(ret, temp);
891     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::NATIVE_CANCEL_TRANSMIT);
892     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
893     ret = stub->OnRemoteRequest(code, data, reply, option);
894     temp = stub->StubTransmitInfrared(data, reply);
895     EXPECT_EQ(ret, temp);
896     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_PIXEL_MAP_DATA);
897     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
898     ret = stub->OnRemoteRequest(code, data, reply, option);
899     temp = stub->StubSetPixelMapData(data, reply);
900     EXPECT_EQ(ret, temp);
901     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_CURRENT_USERID);
902     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
903     ret = stub->OnRemoteRequest(code, data, reply, option);
904     temp = stub->StubSetCurrentUser(data, reply);
905     EXPECT_EQ(ret, temp);
906 }
907 
908 /**
909  * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_012
910  * @tc.desc: Test the function OnRemoteRequest
911  * @tc.type: FUNC
912  * @tc.require:
913  */
914 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_012, TestSize.Level1)
915 {
916     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
917     MessageParcel data;
918     MessageParcel reply;
919     MessageOption option;
920     uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_TOUCHPAD_SCROLL_ROWS);
921     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
922     int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
923     int32_t temp = stub->StubSetTouchpadScrollRows(data, reply);
924     EXPECT_EQ(ret, temp);
925     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_TOUCHPAD_SCROLL_ROWS);
926     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
927     ret = stub->OnRemoteRequest(code, data, reply, option);
928     temp = stub->StubGetTouchpadScrollRows(data, reply);
929     EXPECT_EQ(ret, temp);
930     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::QUERY_SWITCH_STATE_EVENT);
931     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
932     ret = stub->OnRemoteRequest(code, data, reply, option);
933     temp = stub->StubQuerySwitchStatus(data, reply);
934     EXPECT_EQ(ret, temp);
935 }
936 
937 /**
938  * @tc.name: StubHandleAllocSocketFd_001
939  * @tc.desc: Test the function StubHandleAllocSocketFd
940  * @tc.type: FUNC
941  * @tc.require:
942  */
943 HWTEST_F(MultimodalInputConnectStubTest, StubHandleAllocSocketFd_001, TestSize.Level1)
944 {
945     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
946     MessageParcel data;
947     MessageParcel reply;
948     int32_t returnCode = 65142800;
949     int32_t ret = stub->StubHandleAllocSocketFd(data, reply);
950     EXPECT_EQ(ret, returnCode);
951 }
952 
953 /**
954  * @tc.name: StubAddInputEventFilter_001
955  * @tc.desc: Test the function StubAddInputEventFilter
956  * @tc.type: FUNC
957  * @tc.require:
958  */
959 HWTEST_F(MultimodalInputConnectStubTest, StubAddInputEventFilter_001, TestSize.Level1)
960 {
961     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
962     MessageParcel data;
963     MessageParcel reply;
964     int32_t returnCode = 22;
965     int32_t ret = stub->StubAddInputEventFilter(data, reply);
966     EXPECT_EQ(ret, returnCode);
967 }
968 
969 /**
970  * @tc.name: StubRemoveInputEventFilter_001
971  * @tc.desc: Test the function StubRemoveInputEventFilter
972  * @tc.type: FUNC
973  * @tc.require:
974  */
975 HWTEST_F(MultimodalInputConnectStubTest, StubRemoveInputEventFilter_001, TestSize.Level1)
976 {
977     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
978     MessageParcel data;
979     MessageParcel reply;
980     int32_t returnCode = 201;
981     int32_t ret = stub->StubRemoveInputEventFilter(data, reply);
982     EXPECT_EQ(ret, returnCode);
983 }
984 
985 /**
986  * @tc.name: StubSetMouseScrollRows_001
987  * @tc.desc: Test the function StubSetMouseScrollRows
988  * @tc.type: FUNC
989  * @tc.require:
990  */
991 HWTEST_F(MultimodalInputConnectStubTest, StubSetMouseScrollRows_001, TestSize.Level1)
992 {
993     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
994     MessageParcel data;
995     MessageParcel reply;
996     int32_t returnCode = 65142800;
997     int32_t ret = stub->StubSetMouseScrollRows(data, reply);
998     EXPECT_EQ(ret, returnCode);
999 }
1000 
1001 /**
1002  * @tc.name: StubSetCustomCursor_001
1003  * @tc.desc: Test the function StubSetCustomCursor
1004  * @tc.type: FUNC
1005  * @tc.require:
1006  */
1007 HWTEST_F(MultimodalInputConnectStubTest, StubSetCustomCursor_001, TestSize.Level1)
1008 {
1009     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1010     MessageParcel data;
1011     MessageParcel reply;
1012     int32_t returnCode = 65142800;
1013     int32_t ret = stub->StubSetCustomCursor(data, reply);
1014     EXPECT_EQ(ret, returnCode);
1015 }
1016 
1017 /**
1018  * @tc.name: StubSetMouseIcon_001
1019  * @tc.desc: Test the function StubSetMouseIcon
1020  * @tc.type: FUNC
1021  * @tc.require:
1022  */
1023 HWTEST_F(MultimodalInputConnectStubTest, StubSetMouseIcon_001, TestSize.Level1)
1024 {
1025     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1026     MessageParcel data;
1027     MessageParcel reply;
1028     int32_t returnCode = 65142800;
1029     int32_t ret = stub->StubSetMouseIcon(data, reply);
1030     EXPECT_EQ(ret, returnCode);
1031 }
1032 
1033 /**
1034  * @tc.name: StubSetMouseHotSpot_001
1035  * @tc.desc: Test the function StubSetMouseHotSpot
1036  * @tc.type: FUNC
1037  * @tc.require:
1038  */
1039 HWTEST_F(MultimodalInputConnectStubTest, StubSetMouseHotSpot_001, TestSize.Level1)
1040 {
1041     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1042     MessageParcel data;
1043     MessageParcel reply;
1044     int32_t returnCode = 65142800;
1045     int32_t ret = stub->StubSetMouseHotSpot(data, reply);
1046     EXPECT_EQ(ret, returnCode);
1047 }
1048 
1049 /**
1050  * @tc.name: StubGetMouseScrollRows_001
1051  * @tc.desc: Test the function StubGetMouseScrollRows
1052  * @tc.type: FUNC
1053  * @tc.require:
1054  */
1055 HWTEST_F(MultimodalInputConnectStubTest, StubGetMouseScrollRows_001, TestSize.Level1)
1056 {
1057     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1058     MessageParcel data;
1059     MessageParcel reply;
1060     int32_t returnCode = 65142800;
1061     int32_t ret = stub->StubGetMouseScrollRows(data, reply);
1062     EXPECT_EQ(ret, returnCode);
1063 }
1064 
1065 /**
1066  * @tc.name: StubSetPointerSize_001
1067  * @tc.desc: Test the function StubSetPointerSize
1068  * @tc.type: FUNC
1069  * @tc.require:
1070  */
1071 HWTEST_F(MultimodalInputConnectStubTest, StubSetPointerSize_001, TestSize.Level1)
1072 {
1073     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1074     MessageParcel data;
1075     MessageParcel reply;
1076     int32_t returnCode = 65142800;
1077     int32_t ret = stub->StubSetPointerSize(data, reply);
1078     EXPECT_EQ(ret, returnCode);
1079 }
1080 
1081 /**
1082  * @tc.name: StubSetNapStatus_001
1083  * @tc.desc: Test the function StubSetNapStatus
1084  * @tc.type: FUNC
1085  * @tc.require:
1086  */
1087 HWTEST_F(MultimodalInputConnectStubTest, StubSetNapStatus_001, TestSize.Level1)
1088 {
1089     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1090     MessageParcel data;
1091     MessageParcel reply;
1092     int32_t returnCode = 65142800;
1093     int32_t ret = stub->StubSetNapStatus(data, reply);
1094     EXPECT_EQ(ret, returnCode);
1095 }
1096 
1097 /**
1098  * @tc.name: StubGetPointerSize_001
1099  * @tc.desc: Test the function StubGetPointerSize
1100  * @tc.type: FUNC
1101  * @tc.require:
1102  */
1103 HWTEST_F(MultimodalInputConnectStubTest, StubGetPointerSize_001, TestSize.Level1)
1104 {
1105     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1106     MessageParcel data;
1107     MessageParcel reply;
1108     int32_t returnCode = 65142800;
1109     int32_t ret = stub->StubGetPointerSize(data, reply);
1110     EXPECT_EQ(ret, returnCode);
1111 }
1112 
1113 /**
1114  * @tc.name: MultimodalInputConnectStubTest_StubGetPointerSize_002
1115  * @tc.desc: Test the function StubGetPointerSize
1116  * @tc.type: FUNC
1117  * @tc.require:
1118  */
1119 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetPointerSize_002, TestSize.Level1)
1120 {
1121     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1122     MessageParcel data;
1123     MessageParcel reply;
1124     std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
1125     int32_t ret = stub->StubGetPointerSize(data, reply);
1126     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
1127     state_ = ServiceRunningState::STATE_RUNNING;
1128     ret = stub->StubGetPointerSize(data, reply);
1129     EXPECT_NE(ret, RET_OK);
1130 }
1131 
1132 /**
1133  * @tc.name: MultimodalInputConnectStubTest_StubSetMousePrimaryButton_001
1134  * @tc.desc: Test the function StubSetMousePrimaryButton
1135  * @tc.type: FUNC
1136  * @tc.require:
1137  */
1138 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetMousePrimaryButton_001, TestSize.Level1)
1139 {
1140     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1141     MessageParcel data;
1142     MessageParcel reply;
1143     int32_t ret = stub->StubSetMousePrimaryButton(data, reply);
1144     EXPECT_NE(ret, RET_OK);
1145 }
1146 
1147 /**
1148  * @tc.name: MultimodalInputConnectStubTest_StubGetMousePrimaryButton_001
1149  * @tc.desc: Test the function StubGetMousePrimaryButton
1150  * @tc.type: FUNC
1151  * @tc.require:
1152  */
1153 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetMousePrimaryButton_001, TestSize.Level1)
1154 {
1155     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1156     MessageParcel data;
1157     MessageParcel reply;
1158     int32_t ret = stub->StubGetMousePrimaryButton(data, reply);
1159     EXPECT_NE(ret, RET_ERR);
1160 }
1161 
1162 /**
1163  * @tc.name: MultimodalInputConnectStubTest_StubSetHoverScrollState_001
1164  * @tc.desc: Test the function StubSetHoverScrollState
1165  * @tc.type: FUNC
1166  * @tc.require:
1167  */
1168 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetHoverScrollState_001, TestSize.Level1)
1169 {
1170     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1171     MessageParcel data;
1172     MessageParcel reply;
1173     int32_t ret = stub->StubSetHoverScrollState(data, reply);
1174     EXPECT_NE(ret, RET_OK);
1175 }
1176 
1177 /**
1178  * @tc.name: MultimodalInputConnectStubTest_StubGetHoverScrollState_001
1179  * @tc.desc: Test the function StubGetHoverScrollState
1180  * @tc.type: FUNC
1181  * @tc.require:
1182  */
1183 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetHoverScrollState_001, TestSize.Level1)
1184 {
1185     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1186     MessageParcel data;
1187     MessageParcel reply;
1188     int32_t ret = stub->StubGetHoverScrollState(data, reply);
1189     EXPECT_NE(ret, RET_OK);
1190 }
1191 
1192 /**
1193  * @tc.name: MultimodalInputConnectStubTest_StubSetPointerVisible_001
1194  * @tc.desc: Test the function StubSetPointerVisible
1195  * @tc.type: FUNC
1196  * @tc.require:
1197  */
1198 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetPointerVisible_001, TestSize.Level1)
1199 {
1200     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1201     MessageParcel data;
1202     MessageParcel reply;
1203     int32_t ret = stub->StubSetPointerVisible(data, reply);
1204     EXPECT_NE(ret, RET_OK);
1205 }
1206 
1207 /**
1208  * @tc.name: MultimodalInputConnectStubTest_StubIsPointerVisible_001
1209  * @tc.desc: Test the function StubIsPointerVisible
1210  * @tc.type: FUNC
1211  * @tc.require:
1212  */
1213 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubIsPointerVisible_001, TestSize.Level1)
1214 {
1215     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1216     MessageParcel data;
1217     MessageParcel reply;
1218     int32_t ret = stub->StubIsPointerVisible(data, reply);
1219     EXPECT_NE(ret, RET_ERR);
1220 }
1221 
1222 /**
1223  * @tc.name: MultimodalInputConnectStubTest_StubMarkProcessed_001
1224  * @tc.desc: Test the function StubMarkProcessed
1225  * @tc.type: FUNC
1226  * @tc.require:
1227  */
1228 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubMarkProcessed_001, TestSize.Level1)
1229 {
1230     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1231     MessageParcel data;
1232     MessageParcel reply;
1233     int32_t ret = stub->StubMarkProcessed(data, reply);
1234     EXPECT_NE(ret, RET_OK);
1235 }
1236 
1237 /**
1238  * @tc.name: MultimodalInputConnectStubTest_StubSetPointerColor_001
1239  * @tc.desc: Test the function StubSetPointerColor
1240  * @tc.type: FUNC
1241  * @tc.require:
1242  */
1243 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetPointerColor_001, TestSize.Level1)
1244 {
1245     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1246     MessageParcel data;
1247     MessageParcel reply;
1248     std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
1249     int32_t ret = stub->StubSetPointerColor(data, reply);
1250     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
1251     state_ = ServiceRunningState::STATE_RUNNING;
1252     ret = stub->StubSetPointerColor(data, reply);
1253     EXPECT_NE(ret, RET_OK);
1254 }
1255 
1256 /**
1257  * @tc.name: MultimodalInputConnectStubTest_StubGetPointerColor_001
1258  * @tc.desc: Test the function StubGetPointerColor
1259  * @tc.type: FUNC
1260  * @tc.require:
1261  */
1262 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetPointerColor_001, TestSize.Level1)
1263 {
1264     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1265     MessageParcel data;
1266     MessageParcel reply;
1267     std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
1268     int32_t ret = stub->StubGetPointerColor(data, reply);
1269     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
1270     state_ = ServiceRunningState::STATE_RUNNING;
1271     ret = stub->StubGetPointerColor(data, reply);
1272     EXPECT_NE(ret, RET_OK);
1273 }
1274 
1275 /**
1276  * @tc.name: MultimodalInputConnectStubTest_StubSetPointerSpeed_001
1277  * @tc.desc: Test the function StubSetPointerSpeed
1278  * @tc.type: FUNC
1279  * @tc.require:
1280  */
1281 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetPointerSpeed_001, TestSize.Level1)
1282 {
1283     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1284     MessageParcel data;
1285     MessageParcel reply;
1286     int32_t ret = stub->StubSetPointerSpeed(data, reply);
1287     EXPECT_NE(ret, RET_OK);
1288 }
1289 
1290 /**
1291  * @tc.name: MultimodalInputConnectStubTest_StubGetPointerSpeed_001
1292  * @tc.desc: Test the function StubGetPointerSpeed
1293  * @tc.type: FUNC
1294  * @tc.require:
1295  */
1296 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetPointerSpeed_001, TestSize.Level1)
1297 {
1298     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1299     MessageParcel data;
1300     MessageParcel reply;
1301     int32_t ret = stub->StubGetPointerSpeed(data, reply);
1302     EXPECT_EQ(ret, RET_ERR);
1303 }
1304 
1305 /**
1306  * @tc.name: MultimodalInputConnectStubTest_StubNotifyNapOnline_001
1307  * @tc.desc: Test the function StubNotifyNapOnline
1308  * @tc.type: FUNC
1309  * @tc.require:
1310  */
1311 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubNotifyNapOnline_001, TestSize.Level1)
1312 {
1313     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1314     MessageParcel data;
1315     MessageParcel reply;
1316     int32_t ret = stub->StubNotifyNapOnline(data, reply);
1317     EXPECT_EQ(ret, RET_OK);
1318 }
1319 
1320 /**
1321  * @tc.name: MultimodalInputConnectStubTest_StubRemoveInputEventObserver_001
1322  * @tc.desc: Test the function StubRemoveInputEventObserver
1323  * @tc.type: FUNC
1324  * @tc.require:
1325  */
1326 HWTEST_F(MultimodalInputConnectStubTest, StubRemoveInputEventObserver_001, TestSize.Level1)
1327 {
1328     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1329     MessageParcel data;
1330     MessageParcel reply;
1331     int32_t ret = stub->StubRemoveInputEventObserver(data, reply);
1332     EXPECT_EQ(ret, RET_OK);
1333 }
1334 
1335 /**
1336  * @tc.name: MultimodalInputConnectStubTest_StubSetPointerStyle_001
1337  * @tc.desc: Test the function StubSetPointerStyle
1338  * @tc.type: FUNC
1339  * @tc.require:
1340  */
1341 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetPointerStyle_001, TestSize.Level1)
1342 {
1343     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1344     MessageParcel data;
1345     MessageParcel reply;
1346     int32_t ret = stub->StubSetPointerStyle(data, reply);
1347     EXPECT_EQ(ret, RET_ERR);
1348 }
1349 
1350 /**
1351  * @tc.name: MultimodalInputConnectStubTest_StubClearWindowPointerStyle_001
1352  * @tc.desc: Test the function StubClearWindowPointerStyle
1353  * @tc.type: FUNC
1354  * @tc.require:
1355  */
1356 HWTEST_F(MultimodalInputConnectStubTest, StubClearWindowPointerStyle_001, TestSize.Level1)
1357 {
1358     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1359     MessageParcel data;
1360     MessageParcel reply;
1361     int32_t ret = stub->StubClearWindowPointerStyle(data, reply);
1362     EXPECT_EQ(ret, RET_ERR);
1363 }
1364 
1365 /**
1366  * @tc.name: MultimodalInputConnectStubTest_StubGetPointerStyle_001
1367  * @tc.desc: Test the function StubGetPointerStyle
1368  * @tc.type: FUNC
1369  * @tc.require:
1370  */
1371 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetPointerStyle_001, TestSize.Level1)
1372 {
1373     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1374     MessageParcel data;
1375     MessageParcel reply;
1376     int32_t ret = stub->StubGetPointerStyle(data, reply);
1377     EXPECT_EQ(ret, RET_ERR);
1378 }
1379 
1380 /**
1381  * @tc.name: MultimodalInputConnectStubTest_StubSupportKeys_001
1382  * @tc.desc: Test the function StubSupportKeys
1383  * @tc.type: FUNC
1384  * @tc.require:
1385  */
1386 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSupportKeys_001, TestSize.Level1)
1387 {
1388     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1389     MessageParcel data;
1390     MessageParcel reply;
1391     int32_t ret = stub->StubSupportKeys(data, reply);
1392     EXPECT_NE(ret, RET_OK);
1393 }
1394 /**
1395  * @tc.name: StubGetDevice_001
1396  * @tc.desc: Test the function StubGetDevice
1397  * @tc.type: FUNC
1398  * @tc.require:
1399  */
1400 HWTEST_F(MultimodalInputConnectStubTest, StubGetDevice_001, TestSize.Level1)
1401 {
1402     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1403     MessageParcel data;
1404     MessageParcel reply;
1405     int32_t returnCode = 201;
1406     int32_t ret = stub->StubGetDevice(data, reply);
1407     EXPECT_EQ(ret, returnCode);
1408 }
1409 
1410 /**
1411  * @tc.name: StubRegisterInputDeviceMonitor_001
1412  * @tc.desc: Test the function StubRegisterInputDeviceMonitor
1413  * @tc.type: FUNC
1414  * @tc.require:
1415  */
1416 HWTEST_F(MultimodalInputConnectStubTest, StubRegisterInputDeviceMonitor_001, TestSize.Level1)
1417 {
1418     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1419     MessageParcel data;
1420     MessageParcel reply;
1421     int32_t ret = stub->StubRegisterInputDeviceMonitor(data, reply);
1422     EXPECT_NE(ret, RET_ERR);
1423 }
1424 
1425 /**
1426  * @tc.name: StubGetKeyboardType_001
1427  * @tc.desc: Test the function StubGetKeyboardType
1428  * @tc.type: FUNC
1429  * @tc.require:
1430  */
1431 HWTEST_F(MultimodalInputConnectStubTest, StubGetKeyboardType_001, TestSize.Level1)
1432 {
1433     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1434     MessageParcel data;
1435     MessageParcel reply;
1436     int32_t returnCode = 201;
1437     int32_t ret = stub->StubGetKeyboardType(data, reply);
1438     EXPECT_EQ(ret, returnCode);
1439 }
1440 
1441 /**
1442  * @tc.name: StubAddInputHandler_001
1443  * @tc.desc: Test the function StubAddInputHandler
1444  * @tc.type: FUNC
1445  * @tc.require:
1446  */
1447 HWTEST_F(MultimodalInputConnectStubTest, StubAddInputHandler_001, TestSize.Level1)
1448 {
1449     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1450     MessageParcel data;
1451     MessageParcel reply;
1452     int32_t returnCode = 201;
1453     int32_t ret = stub->StubAddInputHandler(data, reply);
1454     EXPECT_EQ(ret, returnCode);
1455 }
1456 
1457 /**
1458  * @tc.name: StubRemoveInputHandler_001
1459  * @tc.desc: Test the function StubRemoveInputHandler
1460  * @tc.type: FUNC
1461  * @tc.require:
1462  */
1463 HWTEST_F(MultimodalInputConnectStubTest, StubRemoveInputHandler_001, TestSize.Level1)
1464 {
1465     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1466     MessageParcel data;
1467     MessageParcel reply;
1468     int32_t returnCode = 201;
1469     int32_t ret = stub->StubRemoveInputHandler(data, reply);
1470     EXPECT_EQ(ret, returnCode);
1471 }
1472 
1473 /**
1474  * @tc.name: StubMarkEventConsumed_001
1475  * @tc.desc: Test the function StubMarkEventConsumed
1476  * @tc.type: FUNC
1477  * @tc.require:
1478  */
1479 HWTEST_F(MultimodalInputConnectStubTest, StubMarkEventConsumed_001, TestSize.Level1)
1480 {
1481     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1482     MessageParcel data;
1483     MessageParcel reply;
1484     int32_t returnCode = 65142800;
1485     int32_t ret = stub->StubMarkEventConsumed(data, reply);
1486     EXPECT_EQ(ret, returnCode);
1487 }
1488 
1489 /**
1490  * @tc.name: StubSubscribeKeyEvent_001
1491  * @tc.desc: Test the function StubSubscribeKeyEvent
1492  * @tc.type: FUNC
1493  * @tc.require:
1494  */
1495 HWTEST_F(MultimodalInputConnectStubTest, StubSubscribeKeyEvent_001, TestSize.Level1)
1496 {
1497     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1498     MessageParcel data;
1499     MessageParcel reply;
1500     int32_t returnCode = 65142800;
1501     int32_t ret = stub->StubSubscribeKeyEvent(data, reply);
1502     EXPECT_EQ(ret, returnCode);
1503 }
1504 
1505 /**
1506  * @tc.name: StubUnsubscribeKeyEvent_001
1507  * @tc.desc: Test the function StubUnsubscribeKeyEvent
1508  * @tc.type: FUNC
1509  * @tc.require:
1510  */
1511 HWTEST_F(MultimodalInputConnectStubTest, StubUnsubscribeKeyEvent_001, TestSize.Level1)
1512 {
1513     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1514     MessageParcel data;
1515     MessageParcel reply;
1516     int32_t returnCode = 65142800;
1517     int32_t ret = stub->StubUnsubscribeKeyEvent(data, reply);
1518     EXPECT_EQ(ret, returnCode);
1519 }
1520 
1521 /**
1522  * @tc.name: StubSubscribeSwitchEvent_001
1523  * @tc.desc: Test the function StubSubscribeSwitchEvent
1524  * @tc.type: FUNC
1525  * @tc.require:
1526  */
1527 HWTEST_F(MultimodalInputConnectStubTest, StubSubscribeSwitchEvent_001, TestSize.Level1)
1528 {
1529     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1530     MessageParcel data;
1531     MessageParcel reply;
1532     int32_t returnCode = 65142800;
1533     int32_t ret = stub->StubSubscribeSwitchEvent(data, reply);
1534     EXPECT_EQ(ret, returnCode);
1535 }
1536 
1537 /**
1538  * @tc.name: StubUnsubscribeSwitchEvent_001
1539  * @tc.desc: Test the function StubUnsubscribeSwitchEvent
1540  * @tc.type: FUNC
1541  * @tc.require:
1542  */
1543 HWTEST_F(MultimodalInputConnectStubTest, StubUnsubscribeSwitchEvent_001, TestSize.Level1)
1544 {
1545     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1546     MessageParcel data;
1547     MessageParcel reply;
1548     int32_t returnCode = 65142800;
1549     int32_t ret = stub->StubUnsubscribeSwitchEvent(data, reply);
1550     EXPECT_EQ(ret, returnCode);
1551 }
1552 
1553 /**
1554  * @tc.name: StubQuerySwitchStatusEvent_001
1555  * @tc.desc: Test the function StubQuerySwitchStatusEvent
1556  * @tc.type: FUNC
1557  * @tc.require:
1558  */
1559 HWTEST_F(MultimodalInputConnectStubTest, StubQuerySwitchStatusEvent_001, TestSize.Level1)
1560 {
1561     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1562     MessageParcel data;
1563     MessageParcel reply;
1564     int32_t returnCode = 65142800;
1565     int32_t ret = stub->StubQuerySwitchStatus(data, reply);
1566     EXPECT_EQ(ret, returnCode);
1567 }
1568 
1569 /**
1570  * @tc.name: StubMoveMouseEvent_001
1571  * @tc.desc: Test the function StubMoveMouseEvent
1572  * @tc.type: FUNC
1573  * @tc.require:
1574  */
1575 HWTEST_F(MultimodalInputConnectStubTest, StubMoveMouseEvent_001, TestSize.Level1)
1576 {
1577     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1578     MessageParcel data;
1579     MessageParcel reply;
1580     int32_t returnCode = 65142800;
1581     int32_t ret = stub->StubMoveMouseEvent(data, reply);
1582     EXPECT_EQ(ret, returnCode);
1583 }
1584 
1585 /**
1586  * @tc.name: StubInjectKeyEvent_001
1587  * @tc.desc: Test the function StubInjectKeyEvent
1588  * @tc.type: FUNC
1589  * @tc.require:
1590  */
1591 HWTEST_F(MultimodalInputConnectStubTest, StubInjectKeyEvent_001, TestSize.Level1)
1592 {
1593     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1594     MessageParcel data;
1595     MessageParcel reply;
1596     int32_t returnCode = 65142800;
1597     int32_t ret = stub->StubInjectKeyEvent(data, reply);
1598     EXPECT_EQ(ret, returnCode);
1599 }
1600 
1601 /**
1602  * @tc.name: StubSetAnrListener_001
1603  * @tc.desc: Test the function StubSetAnrListener
1604  * @tc.type: FUNC
1605  * @tc.require:
1606  */
1607 HWTEST_F(MultimodalInputConnectStubTest, StubSetAnrListener_001, TestSize.Level1)
1608 {
1609     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1610     MessageParcel data;
1611     MessageParcel reply;
1612     int32_t returnCode = 65142800;
1613     int32_t ret = stub->StubSetAnrListener(data, reply);
1614     EXPECT_EQ(ret, returnCode);
1615 }
1616 
1617 /**
1618  * @tc.name: StubGetDisplayBindInfo_001
1619  * @tc.desc: Test the function StubGetDisplayBindInfo
1620  * @tc.type: FUNC
1621  * @tc.require:
1622  */
1623 HWTEST_F(MultimodalInputConnectStubTest, StubGetDisplayBindInfo_001, TestSize.Level1)
1624 {
1625     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1626     MessageParcel data;
1627     MessageParcel reply;
1628     int32_t returnCode = 65142800;
1629     int32_t ret = stub->StubGetDisplayBindInfo(data, reply);
1630     EXPECT_EQ(ret, returnCode);
1631 }
1632 
1633 /**
1634  * @tc.name: StubGetAllMmiSubscribedEvents_001
1635  * @tc.desc: Test the function StubGetAllMmiSubscribedEvents
1636  * @tc.type: FUNC
1637  * @tc.require:
1638  */
1639 HWTEST_F(MultimodalInputConnectStubTest, StubGetAllMmiSubscribedEvents_001, TestSize.Level1)
1640 {
1641     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1642     MessageParcel data;
1643     MessageParcel reply;
1644     int32_t returnCode = 65142800;
1645     int32_t ret = stub->StubGetAllMmiSubscribedEvents(data, reply);
1646     EXPECT_EQ(ret, returnCode);
1647 }
1648 
1649 /**
1650  * @tc.name: StubSetDisplayBind_001
1651  * @tc.desc: Test the function StubSetDisplayBind
1652  * @tc.type: FUNC
1653  * @tc.require:
1654  */
1655 HWTEST_F(MultimodalInputConnectStubTest, StubSetDisplayBind_001, TestSize.Level1)
1656 {
1657     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1658     MessageParcel data;
1659     MessageParcel reply;
1660     int32_t returnCode = 65142800;
1661     int32_t ret = stub->StubSetDisplayBind(data, reply);
1662     EXPECT_EQ(ret, returnCode);
1663 }
1664 
1665 /**
1666  * @tc.name: StubGetFunctionKeyState_001
1667  * @tc.desc: Test the function StubGetFunctionKeyState
1668  * @tc.type: FUNC
1669  * @tc.require:
1670  */
1671 HWTEST_F(MultimodalInputConnectStubTest, StubGetFunctionKeyState_001, TestSize.Level1)
1672 {
1673     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1674     MessageParcel data;
1675     MessageParcel reply;
1676     int32_t returnCode = 65142800;
1677     int32_t ret = stub->StubGetFunctionKeyState(data, reply);
1678     EXPECT_EQ(ret, returnCode);
1679 }
1680 
1681 /**
1682  * @tc.name: StubSetFunctionKeyState_001
1683  * @tc.desc: Test the function StubSetFunctionKeyState
1684  * @tc.type: FUNC
1685  * @tc.require:
1686  */
1687 HWTEST_F(MultimodalInputConnectStubTest, StubSetFunctionKeyState_001, TestSize.Level1)
1688 {
1689     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1690     MessageParcel data;
1691     MessageParcel reply;
1692     int32_t returnCode = 65142800;
1693     int32_t ret = stub->StubSetFunctionKeyState(data, reply);
1694     EXPECT_EQ(ret, returnCode);
1695 }
1696 
1697 /**
1698  * @tc.name: StubSetPointerLocation_001
1699  * @tc.desc: Test the function StubSetPointerLocation
1700  * @tc.type: FUNC
1701  * @tc.require:
1702  */
1703 HWTEST_F(MultimodalInputConnectStubTest, StubSetPointerLocation_001, TestSize.Level1)
1704 {
1705     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1706     MessageParcel data;
1707     MessageParcel reply;
1708     int32_t returnCode = 65142800;
1709     int32_t ret = stub->StubSetPointerLocation(data, reply);
1710     EXPECT_EQ(ret, returnCode);
1711 }
1712 
1713 /**
1714  * @tc.name: StubSetMouseCaptureMode_001
1715  * @tc.desc: Test the function StubSetMouseCaptureMode
1716  * @tc.type: FUNC
1717  * @tc.require:
1718  */
1719 HWTEST_F(MultimodalInputConnectStubTest, StubSetMouseCaptureMode_001, TestSize.Level1)
1720 {
1721     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1722     MessageParcel data;
1723     MessageParcel reply;
1724     int32_t returnCode = 201;
1725     int32_t ret = stub->StubSetMouseCaptureMode(data, reply);
1726     EXPECT_EQ(ret, returnCode);
1727 }
1728 
1729 /**
1730  * @tc.name: MultimodalInputConnectStubTest_StubGetWindowPid_001
1731  * @tc.desc: Test the function StubGetWindowPid
1732  * @tc.type: FUNC
1733  * @tc.require:
1734  */
1735 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetWindowPid_001, TestSize.Level1)
1736 {
1737     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1738     MessageParcel data;
1739     MessageParcel reply;
1740     std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
1741     int32_t ret = stub->StubGetWindowPid(data, reply);
1742     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
1743     state = ServiceRunningState::STATE_RUNNING;
1744     ret = stub->StubGetWindowPid(data, reply);
1745     EXPECT_NE(ret, RET_OK);
1746 }
1747 
1748 /**
1749  * @tc.name: MultimodalInputConnectStubTest_StubAppendExtraData_001
1750  * @tc.desc: Test the function StubAppendExtraData
1751  * @tc.type: FUNC
1752  * @tc.require:
1753  */
1754 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubAppendExtraData_001, TestSize.Level1)
1755 {
1756     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1757     MessageParcel data;
1758     MessageParcel reply;
1759     std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
1760     int32_t ret = stub->StubAppendExtraData(data, reply);
1761     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
1762     state = ServiceRunningState::STATE_RUNNING;
1763     ret = stub->StubAppendExtraData(data, reply);
1764     EXPECT_NE(ret, RET_OK);
1765 }
1766 
1767 /**
1768  * @tc.name: MultimodalInputConnectStubTest_StubEnableCombineKey_001
1769  * @tc.desc: Test the function StubEnableCombineKey
1770  * @tc.type: FUNC
1771  * @tc.require:
1772  */
1773 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubEnableCombineKey_001, TestSize.Level1)
1774 {
1775     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1776     MessageParcel data;
1777     MessageParcel reply;
1778     std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
1779     int32_t ret = stub->StubEnableCombineKey(data, reply);
1780     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
1781     state = ServiceRunningState::STATE_RUNNING;
1782     ret = stub->StubEnableCombineKey(data, reply);
1783     EXPECT_NE(ret, RET_OK);
1784 }
1785 
1786 /**
1787  * @tc.name: MultimodalInputConnectStubTest_StubEnableInputDevice_001
1788  * @tc.desc: Test the function StubEnableInputDevice
1789  * @tc.type: FUNC
1790  * @tc.require:
1791  */
1792 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubEnableInputDevice_001, TestSize.Level1)
1793 {
1794     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1795     MessageParcel data;
1796     MessageParcel reply;
1797     std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
1798     int32_t ret = stub->StubEnableInputDevice(data, reply);
1799     EXPECT_EQ(ret, RET_OK);
1800     state = ServiceRunningState::STATE_RUNNING;
1801     ret = stub->StubEnableInputDevice(data, reply);
1802     EXPECT_EQ(ret, RET_OK);
1803 }
1804 
1805 /**
1806  * @tc.name: MultimodalInputConnectStubTest_StubSetKeyDownDuration_001
1807  * @tc.desc: Test the function StubSetKeyDownDuration
1808  * @tc.type: FUNC
1809  * @tc.require:
1810  */
1811 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetKeyDownDuration_001, TestSize.Level1)
1812 {
1813     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1814     MessageParcel data;
1815     MessageParcel reply;
1816     std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
1817     int32_t ret = stub->StubSetKeyDownDuration(data, reply);
1818     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
1819     state = ServiceRunningState::STATE_RUNNING;
1820     ret = stub->StubSetKeyDownDuration(data, reply);
1821     EXPECT_NE(ret, RET_OK);
1822 }
1823 
1824 /**
1825  * @tc.name: MultimodalInputConnectStubTest_VerifyTouchPadSetting_001
1826  * @tc.desc: Test the function VerifyTouchPadSetting
1827  * @tc.type: FUNC
1828  * @tc.require:
1829  */
1830 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_VerifyTouchPadSetting_001, TestSize.Level1)
1831 {
1832     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1833     std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
1834     int32_t ret = stub->VerifyTouchPadSetting();
1835     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
1836     state = ServiceRunningState::STATE_RUNNING;
1837     ret = stub->VerifyTouchPadSetting();
1838     EXPECT_NE(ret, RET_OK);
1839 }
1840 
1841 /**
1842  * @tc.name: MultimodalInputConnectStubTest_StubSetTouchpadScrollSwitch_001
1843  * @tc.desc: Test the function StubSetTouchpadScrollSwitch
1844  * @tc.type: FUNC
1845  * @tc.require:
1846  */
1847 HWTEST_F(MultimodalInputConnectStubTest, StubSetTouchpadScrollSwitch_001, TestSize.Level1)
1848 {
1849     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1850     MessageParcel data;
1851     MessageParcel reply;
1852     int32_t ret = stub->StubSetTouchpadScrollSwitch(data, reply);
1853     EXPECT_NE(ret, RET_OK);
1854 }
1855 
1856 /**
1857  * @tc.name: MultimodalInputConnectStubTest_StubGetTouchpadScrollSwitch_001
1858  * @tc.desc: Test the function StubGetTouchpadScrollSwitch
1859  * @tc.type: FUNC
1860  * @tc.require:
1861  */
1862 HWTEST_F(MultimodalInputConnectStubTest, StubGetTouchpadScrollSwitch_001, TestSize.Level1)
1863 {
1864     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1865     MessageParcel data;
1866     MessageParcel reply;
1867     int32_t ret = stub->StubGetTouchpadScrollSwitch(data, reply);
1868     EXPECT_NE(ret, RET_OK);
1869 }
1870 
1871 /**
1872  * @tc.name: MultimodalInputConnectStubTest_StubSetTouchpadScrollDirection_001
1873  * @tc.desc: Test the function StubSetTouchpadScrollDirection
1874  * @tc.type: FUNC
1875  * @tc.require:
1876  */
1877 HWTEST_F(MultimodalInputConnectStubTest, StubSetTouchpadScrollDirection_001, TestSize.Level1)
1878 {
1879     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1880     MessageParcel data;
1881     MessageParcel reply;
1882     int32_t ret = stub->StubSetTouchpadScrollDirection(data, reply);
1883     EXPECT_NE(ret, RET_OK);
1884 }
1885 
1886 /**
1887  * @tc.name: MultimodalInputConnectStubTest_StubGetTouchpadScrollDirection_001
1888  * @tc.desc: Test the function StubGetTouchpadScrollDirection
1889  * @tc.type: FUNC
1890  * @tc.require:
1891  */
1892 HWTEST_F(MultimodalInputConnectStubTest, StubGetTouchpadScrollDirection_001, TestSize.Level1)
1893 {
1894     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1895     MessageParcel data;
1896     MessageParcel reply;
1897     int32_t ret = stub->StubGetTouchpadScrollDirection(data, reply);
1898     EXPECT_NE(ret, RET_OK);
1899 }
1900 
1901 /**
1902  * @tc.name: MultimodalInputConnectStubTest_StubSetTouchpadTapSwitch_001
1903  * @tc.desc: Test the function StubSetTouchpadTapSwitch
1904  * @tc.type: FUNC
1905  * @tc.require:
1906  */
1907 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetTouchpadTapSwitch_001, TestSize.Level1)
1908 {
1909     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1910     MessageParcel data;
1911     MessageParcel reply;
1912     int32_t ret = stub->StubSetTouchpadTapSwitch(data, reply);
1913     EXPECT_NE(ret, RET_OK);
1914 }
1915 
1916 /**
1917  * @tc.name: MultimodalInputConnectStubTest_StubGetTouchpadTapSwitch_001
1918  * @tc.desc: Test the function StubGetTouchpadTapSwitch
1919  * @tc.type: FUNC
1920  * @tc.require:
1921  */
1922 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetTouchpadTapSwitch_001, TestSize.Level1)
1923 {
1924     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1925     MessageParcel data;
1926     MessageParcel reply;
1927     int32_t ret = stub->StubGetTouchpadTapSwitch(data, reply);
1928     EXPECT_NE(ret, RET_OK);
1929 }
1930 
1931 /**
1932  * @tc.name: MultimodalInputConnectStubTest_StubSetTouchpadPointerSpeed_001
1933  * @tc.desc: Test the function StubSetTouchpadPointerSpeed
1934  * @tc.type: FUNC
1935  * @tc.require:
1936  */
1937 HWTEST_F(MultimodalInputConnectStubTest, StubSetTouchpadPointerSpeed_001, TestSize.Level1)
1938 {
1939     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1940     MessageParcel data;
1941     MessageParcel reply;
1942     int32_t ret = stub->StubSetTouchpadPointerSpeed(data, reply);
1943     EXPECT_NE(ret, RET_OK);
1944 }
1945 
1946 /**
1947  * @tc.name: MultimodalInputConnectStubTest_StubGetTouchpadPointerSpeed_001
1948  * @tc.desc: Test the function StubGetTouchpadPointerSpeed
1949  * @tc.type: FUNC
1950  * @tc.require:
1951  */
1952 HWTEST_F(MultimodalInputConnectStubTest, StubGetTouchpadPointerSpeed_001, TestSize.Level1)
1953 {
1954     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1955     MessageParcel data;
1956     MessageParcel reply;
1957     int32_t ret = stub->StubGetTouchpadPointerSpeed(data, reply);
1958     EXPECT_NE(ret, RET_OK);
1959 }
1960 
1961 /**
1962  * @tc.name: MultimodalInputConnectStubTest_StubSetKeyboardRepeatDelay_001
1963  * @tc.desc: Test the function StubSetKeyboardRepeatDelay
1964  * @tc.type: FUNC
1965  * @tc.require:
1966  */
1967 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetKeyboardRepeatDelay_001, TestSize.Level1)
1968 {
1969     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1970     MessageParcel data;
1971     MessageParcel reply;
1972     std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
1973     int32_t ret = stub->StubSetKeyboardRepeatDelay(data, reply);
1974     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
1975     state = ServiceRunningState::STATE_RUNNING;
1976     ret = stub->StubSetKeyboardRepeatDelay(data, reply);
1977     EXPECT_NE(ret, RET_OK);
1978 }
1979 
1980 /**
1981  * @tc.name: MultimodalInputConnectStubTest_StubSetKeyboardRepeatRate_001
1982  * @tc.desc: Test the function StubSetKeyboardRepeatRate
1983  * @tc.type: FUNC
1984  * @tc.require:
1985  */
1986 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetKeyboardRepeatRate_001, TestSize.Level1)
1987 {
1988     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
1989     MessageParcel data;
1990     MessageParcel reply;
1991     std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
1992     int32_t ret = stub->StubSetKeyboardRepeatRate(data, reply);
1993     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
1994     state = ServiceRunningState::STATE_RUNNING;
1995     ret = stub->StubSetKeyboardRepeatRate(data, reply);
1996     EXPECT_NE(ret, RET_OK);
1997 }
1998 
1999 /**
2000  * @tc.name: MultimodalInputConnectStubTest_StubGetKeyboardRepeatDelay_001
2001  * @tc.desc: Test the function StubGetKeyboardRepeatDelay
2002  * @tc.type: FUNC
2003  * @tc.require:
2004  */
2005 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetKeyboardRepeatDelay_001, TestSize.Level1)
2006 {
2007     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2008     MessageParcel data;
2009     MessageParcel reply;
2010     std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
2011     int32_t ret = stub->StubGetKeyboardRepeatDelay(data, reply);
2012     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2013     state = ServiceRunningState::STATE_RUNNING;
2014     ret = stub->StubGetKeyboardRepeatDelay(data, reply);
2015     EXPECT_NE(ret, RET_OK);
2016 }
2017 
2018 /**
2019  * @tc.name: MultimodalInputConnectStubTest_StubGetKeyboardRepeatRate_001
2020  * @tc.desc: Test the function StubGetKeyboardRepeatRate
2021  * @tc.type: FUNC
2022  * @tc.require:
2023  */
2024 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetKeyboardRepeatRate_001, TestSize.Level1)
2025 {
2026     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2027     MessageParcel data;
2028     MessageParcel reply;
2029     std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
2030     int32_t ret = stub->StubGetKeyboardRepeatRate(data, reply);
2031     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2032     state = ServiceRunningState::STATE_RUNNING;
2033     ret = stub->StubGetKeyboardRepeatRate(data, reply);
2034     EXPECT_NE(ret, RET_OK);
2035 }
2036 
2037 /**
2038  * @tc.name: MultimodalInputConnectStubTest_StubSetTouchpadPinchSwitch_001
2039  * @tc.desc: Test the function StubSetTouchpadPinchSwitch
2040  * @tc.type: FUNC
2041  * @tc.require:
2042  */
2043 HWTEST_F(MultimodalInputConnectStubTest, StubSetTouchpadPinchSwitch_001, TestSize.Level1)
2044 {
2045     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2046     MessageParcel data;
2047     MessageParcel reply;
2048     int32_t ret = stub->StubSetTouchpadPinchSwitch(data, reply);
2049     EXPECT_NE(ret, RET_OK);
2050 }
2051 
2052 /**
2053  * @tc.name: MultimodalInputConnectStubTest_StubGetTouchpadPinchSwitch_001
2054  * @tc.desc: Test the function StubGetTouchpadPinchSwitch
2055  * @tc.type: FUNC
2056  * @tc.require:
2057  */
2058 HWTEST_F(MultimodalInputConnectStubTest, StubGetTouchpadPinchSwitch_001, TestSize.Level1)
2059 {
2060     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2061     MessageParcel data;
2062     MessageParcel reply;
2063     int32_t ret = stub->StubGetTouchpadPinchSwitch(data, reply);
2064     EXPECT_NE(ret, RET_OK);
2065 }
2066 
2067 /**
2068  * @tc.name: MultimodalInputConnectStubTest_StubSetTouchpadSwipeSwitch_001
2069  * @tc.desc: Test the function StubSetTouchpadSwipeSwitch
2070  * @tc.type: FUNC
2071  * @tc.require:
2072  */
2073 HWTEST_F(MultimodalInputConnectStubTest, StubSetTouchpadSwipeSwitch_001, TestSize.Level1)
2074 {
2075     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2076     MessageParcel data;
2077     MessageParcel reply;
2078     int32_t ret = stub->StubSetTouchpadSwipeSwitch(data, reply);
2079     EXPECT_NE(ret, RET_OK);
2080 }
2081 
2082 /**
2083  * @tc.name: MultimodalInputConnectStubTest_StubGetTouchpadSwipeSwitch_001
2084  * @tc.desc: Test the function StubGetTouchpadSwipeSwitch
2085  * @tc.type: FUNC
2086  * @tc.require:
2087  */
2088 HWTEST_F(MultimodalInputConnectStubTest, StubGetTouchpadSwipeSwitch_001, TestSize.Level1)
2089 {
2090     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2091     MessageParcel data;
2092     MessageParcel reply;
2093     int32_t ret = stub->StubGetTouchpadSwipeSwitch(data, reply);
2094     EXPECT_NE(ret, RET_OK);
2095 }
2096 
2097 /**
2098  * @tc.name: MultimodalInputConnectStubTest_StubSetTouchpadRightClickType_001
2099  * @tc.desc: Test the function StubSetTouchpadRightClickType
2100  * @tc.type: FUNC
2101  * @tc.require:
2102  */
2103 HWTEST_F(MultimodalInputConnectStubTest, StubSetTouchpadRightClickType_001, TestSize.Level1)
2104 {
2105     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2106     MessageParcel data;
2107     MessageParcel reply;
2108     int32_t ret = stub->StubSetTouchpadRightClickType(data, reply);
2109     EXPECT_NE(ret, RET_OK);
2110 }
2111 
2112 /**
2113  * @tc.name: MultimodalInputConnectStubTest_StubGetTouchpadRightClickType_001
2114  * @tc.desc: Test the function StubGetTouchpadRightClickType
2115  * @tc.type: FUNC
2116  * @tc.require:
2117  */
2118 HWTEST_F(MultimodalInputConnectStubTest, StubGetTouchpadRightClickType_001, TestSize.Level1)
2119 {
2120     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2121     MessageParcel data;
2122     MessageParcel reply;
2123     int32_t ret = stub->StubGetTouchpadRightClickType(data, reply);
2124     EXPECT_NE(ret, RET_OK);
2125 }
2126 
2127 /**
2128  * @tc.name: MultimodalInputConnectStubTest_StubSetTouchpadRotateSwitch_001
2129  * @tc.desc: Test the function StubSetTouchpadRotateSwitch
2130  * @tc.type: FUNC
2131  * @tc.require:
2132  */
2133 HWTEST_F(MultimodalInputConnectStubTest, StubSetTouchpadRotateSwitch_001, TestSize.Level1)
2134 {
2135     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2136     MessageParcel data;
2137     MessageParcel reply;
2138     int32_t ret = stub->StubSetTouchpadRotateSwitch(data, reply);
2139     EXPECT_NE(ret, RET_OK);
2140 }
2141 
2142 /**
2143  * @tc.name: MultimodalInputConnectStubTest_StubGetTouchpadRotateSwitch_001
2144  * @tc.desc: Test the function StubGetTouchpadRotateSwitch
2145  * @tc.type: FUNC
2146  * @tc.require:
2147  */
2148 HWTEST_F(MultimodalInputConnectStubTest, StubGetTouchpadRotateSwitch_001, TestSize.Level1)
2149 {
2150     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2151     MessageParcel data;
2152     MessageParcel reply;
2153     int32_t ret = stub->StubGetTouchpadRotateSwitch(data, reply);
2154     EXPECT_NE(ret, RET_OK);
2155 }
2156 
2157 /**
2158  * @tc.name: MultimodalInputConnectStubTest_StubSetShieldStatus_001
2159  * @tc.desc: Test the function StubSetShieldStatus
2160  * @tc.type: FUNC
2161  * @tc.require:
2162  */
2163 HWTEST_F(MultimodalInputConnectStubTest, StubSetShieldStatus_001, TestSize.Level1)
2164 {
2165     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2166     MessageParcel data;
2167     MessageParcel reply;
2168     int32_t ret = stub->StubSetShieldStatus(data, reply);
2169     EXPECT_NE(ret, RET_OK);
2170 }
2171 
2172 /**
2173  * @tc.name: MultimodalInputConnectStubTest_StubSetShieldStatus_001
2174  * @tc.desc: Test the function StubSetShieldStatus
2175  * @tc.type: FUNC
2176  * @tc.require:
2177  */
2178 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetShieldStatus_001, TestSize.Level1)
2179 {
2180     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2181     MessageParcel data;
2182     MessageParcel reply;
2183     std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
2184     int32_t ret = stub->StubSetShieldStatus(data, reply);
2185     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2186     state = ServiceRunningState::STATE_RUNNING;
2187     ret = stub->StubSetShieldStatus(data, reply);
2188     EXPECT_NE(ret, RET_OK);
2189 }
2190 
2191 /**
2192  * @tc.name: MultimodalInputConnectStubTest_StubGetShieldStatus_001
2193  * @tc.desc: Test the function StubGetShieldStatus
2194  * @tc.type: FUNC
2195  * @tc.require:
2196  */
2197 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubGetShieldStatus_001, TestSize.Level1)
2198 {
2199     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2200     MessageParcel data;
2201     MessageParcel reply;
2202     std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
2203     int32_t ret = stub->StubGetShieldStatus(data, reply);
2204     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2205     state = ServiceRunningState::STATE_RUNNING;
2206     ret = stub->StubGetShieldStatus(data, reply);
2207     EXPECT_NE(ret, RET_OK);
2208 }
2209 
2210 /**
2211  * @tc.name: MultimodalInputConnectStubTest_StubGetKeyState_001
2212  * @tc.desc: Test the function StubGetKeyState
2213  * @tc.type: FUNC
2214  * @tc.require:
2215  */
2216 HWTEST_F(MultimodalInputConnectStubTest, StubGetKeyState_001, TestSize.Level1)
2217 {
2218     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2219     MessageParcel data;
2220     MessageParcel reply;
2221     int32_t ret = stub->StubGetKeyState(data, reply);
2222     EXPECT_EQ(ret, RET_ERR);
2223 }
2224 
2225 /**
2226  * @tc.name: MultimodalInputConnectStubTest_StubAuthorize_001
2227  * @tc.desc: Test the function StubAuthorize
2228  * @tc.type: FUNC
2229  * @tc.require:
2230  */
2231 HWTEST_F(MultimodalInputConnectStubTest, StubAuthorize_001, TestSize.Level1)
2232 {
2233     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2234     MessageParcel data;
2235     MessageParcel reply;
2236     int32_t ret = stub->StubAuthorize(data, reply);
2237     EXPECT_NE(ret, RET_OK);
2238 }
2239 
2240 /**
2241  * @tc.name: MultimodalInputConnectStubTest_StubCancelInjection_001
2242  * @tc.desc: Test the function StubCancelInjection
2243  * @tc.type: FUNC
2244  * @tc.require:
2245  */
2246 HWTEST_F(MultimodalInputConnectStubTest, StubCancelInjection_001, TestSize.Level1)
2247 {
2248     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2249     MessageParcel data;
2250     MessageParcel reply;
2251     int32_t ret = stub->StubCancelInjection(data, reply);
2252     EXPECT_NE(ret, RET_OK);
2253 }
2254 
2255 /**
2256  * @tc.name: MultimodalInputConnectStubTest_StubHasIrEmitter_001
2257  * @tc.desc: Test the function StubHasIrEmitter
2258  * @tc.type: FUNC
2259  * @tc.require:
2260  */
2261 HWTEST_F(MultimodalInputConnectStubTest, StubHasIrEmitter_001, TestSize.Level1)
2262 {
2263     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2264     MessageParcel data;
2265     MessageParcel reply;
2266     int32_t ret = stub->StubHasIrEmitter(data, reply);
2267     EXPECT_NE(ret, RET_OK);
2268 }
2269 
2270 /**
2271  * @tc.name: MultimodalInputConnectStubTest_StubGetInfraredFrequencies_001
2272  * @tc.desc: Test the function StubGetInfraredFrequencies
2273  * @tc.type: FUNC
2274  * @tc.require:
2275  */
2276 HWTEST_F(MultimodalInputConnectStubTest, StubGetInfraredFrequencies_001, TestSize.Level1)
2277 {
2278     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2279     MessageParcel data;
2280     MessageParcel reply;
2281     int32_t ret = stub->StubGetInfraredFrequencies(data, reply);
2282     EXPECT_NE(ret, RET_OK);
2283 }
2284 
2285 /**
2286  * @tc.name: MultimodalInputConnectStubTest_StubTransmitInfrared_001
2287  * @tc.desc: Test the function StubTransmitInfrared
2288  * @tc.type: FUNC
2289  * @tc.require:
2290  */
2291 HWTEST_F(MultimodalInputConnectStubTest, StubTransmitInfrared_001, TestSize.Level1)
2292 {
2293     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2294     MessageParcel data;
2295     MessageParcel reply;
2296     int32_t ret = stub->StubTransmitInfrared(data, reply);
2297     EXPECT_NE(ret, RET_OK);
2298 }
2299 
2300 /**
2301  * @tc.name: MultimodalInputConnectStubTest_StubSetPixelMapData_001
2302  * @tc.desc: Test the function StubSetPixelMapData
2303  * @tc.type: FUNC
2304  * @tc.require:
2305  */
2306 HWTEST_F(MultimodalInputConnectStubTest, MultimodalInputConnectStubTest_StubSetPixelMapData_001, TestSize.Level1)
2307 {
2308     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2309     MessageParcel data;
2310     MessageParcel reply;
2311     std::atomic<ServiceRunningState> state = ServiceRunningState::STATE_NOT_START;
2312     int32_t ret = stub->StubSetPixelMapData(data, reply);
2313     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2314     state = ServiceRunningState::STATE_RUNNING;
2315     ret = stub->StubSetPixelMapData(data, reply);
2316     EXPECT_NE(ret, RET_OK);
2317 }
2318 
2319 /**
2320  * @tc.name: MultimodalInputConnectStubTest_StubSetCurrentUser_001
2321  * @tc.desc: Test the function StubSetCurrentUser
2322  * @tc.type: FUNC
2323  * @tc.require:
2324  */
2325 HWTEST_F(MultimodalInputConnectStubTest, StubSetCurrentUser_001, TestSize.Level1)
2326 {
2327     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2328     MessageParcel data;
2329     MessageParcel reply;
2330     int32_t ret = stub->StubSetCurrentUser(data, reply);
2331     EXPECT_NE(ret, RET_OK);
2332 }
2333 
2334 /**
2335  * @tc.name: StubHandleAllocSocketFd_002
2336  * @tc.desc: Test the function StubHandleAllocSocketFd
2337  * @tc.type: FUNC
2338  * @tc.require:
2339  */
2340 HWTEST_F(MultimodalInputConnectStubTest, StubHandleAllocSocketFd_002, TestSize.Level1)
2341 {
2342     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2343     MessageParcel data;
2344     MessageParcel reply;
2345     std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
2346     int32_t ret = stub->StubHandleAllocSocketFd(data, reply);
2347     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2348     state_ = ServiceRunningState::STATE_RUNNING;
2349     ret = stub->StubHandleAllocSocketFd(data, reply);
2350     EXPECT_NE(ret, RET_OK);
2351 }
2352 
2353 /**
2354  * @tc.name: StubSetMouseScrollRows_002
2355  * @tc.desc: Test the function StubSetMouseScrollRows
2356  * @tc.type: FUNC
2357  * @tc.require:
2358  */
2359 HWTEST_F(MultimodalInputConnectStubTest, StubSetMouseScrollRows_002, TestSize.Level1)
2360 {
2361     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2362     MessageParcel data;
2363     MessageParcel reply;
2364     std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
2365     int32_t ret = stub->StubSetMouseScrollRows(data, reply);
2366     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2367     state_ = ServiceRunningState::STATE_RUNNING;
2368     ret = stub->StubSetMouseScrollRows(data, reply);
2369     EXPECT_NE(ret, RET_OK);
2370 }
2371 
2372 /**
2373  * @tc.name: StubSetCustomCursor_002
2374  * @tc.desc: Test the function StubSetCustomCursor
2375  * @tc.type: FUNC
2376  * @tc.require:
2377  */
2378 HWTEST_F(MultimodalInputConnectStubTest, StubSetCustomCursor_002, TestSize.Level1)
2379 {
2380     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2381     MessageParcel data;
2382     MessageParcel reply;
2383     std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
2384     int32_t ret = stub->StubSetCustomCursor(data, reply);
2385     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2386     state_ = ServiceRunningState::STATE_RUNNING;
2387     ret = stub->StubSetCustomCursor(data, reply);
2388     EXPECT_NE(ret, RET_OK);
2389 }
2390 
2391 /**
2392  * @tc.name: StubSetMouseIcon_002
2393  * @tc.desc: Test the function StubSetMouseIcon
2394  * @tc.type: FUNC
2395  * @tc.require:
2396  */
2397 HWTEST_F(MultimodalInputConnectStubTest, StubSetMouseIcon_002, TestSize.Level1)
2398 {
2399     std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2400     MessageParcel data;
2401     MessageParcel reply;
2402     std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
2403     int32_t ret = stub->StubSetMouseIcon(data, reply);
2404     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2405     state_ = ServiceRunningState::STATE_RUNNING;
2406     ret = stub->StubSetMouseIcon(data, reply);
2407     EXPECT_NE(ret, RET_OK);
2408 }
2409 
2410 /**
2411  * @tc.name: StubSetMouseHotSpot_002
2412  * @tc.desc: Test the function StubSetMouseHotSpot
2413  * @tc.type: FUNC
2414  * @tc.require:
2415  */
2416 HWTEST_F(MultimodalInputConnectStubTest, StubSetMouseHotSpot_002, TestSize.Level1)
2417 {
2418     std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2419     MessageParcel data;
2420     MessageParcel reply;
2421     std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
2422     int32_t ret = stub->StubSetMouseHotSpot(data, reply);
2423     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2424     state_ = ServiceRunningState::STATE_RUNNING;
2425     ret = stub->StubSetMouseHotSpot(data, reply);
2426     EXPECT_NE(ret, RET_OK);
2427 }
2428 
2429 /**
2430  * @tc.name: StubGetMouseScrollRows_002
2431  * @tc.desc: Test the function StubGetMouseScrollRows
2432  * @tc.type: FUNC
2433  * @tc.require:
2434  */
2435 HWTEST_F(MultimodalInputConnectStubTest, StubGetMouseScrollRows_002, TestSize.Level1)
2436 {
2437     std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2438     MessageParcel data;
2439     MessageParcel reply;
2440     std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
2441     int32_t ret = stub->StubGetMouseScrollRows(data, reply);
2442     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2443     state_ = ServiceRunningState::STATE_RUNNING;
2444     ret = stub->StubGetMouseScrollRows(data, reply);
2445     EXPECT_NE(ret, RET_OK);
2446 }
2447 
2448 /**
2449  * @tc.name: StubSetPointerSize_002
2450  * @tc.desc: Test the function StubSetPointerSize
2451  * @tc.type: FUNC
2452  * @tc.require:
2453  */
2454 HWTEST_F(MultimodalInputConnectStubTest, StubSetPointerSize_002, TestSize.Level1)
2455 {
2456     std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2457     MessageParcel data;
2458     MessageParcel reply;
2459     std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
2460     int32_t ret = stub->StubSetPointerSize(data, reply);
2461     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2462     state_ = ServiceRunningState::STATE_RUNNING;
2463     ret = stub->StubSetPointerSize(data, reply);
2464     EXPECT_NE(ret, RET_OK);
2465 }
2466 
2467 /**
2468  * @tc.name: StubSetNapStatus_002
2469  * @tc.desc: Test the function StubSetNapStatus
2470  * @tc.type: FUNC
2471  * @tc.require:
2472  */
2473 HWTEST_F(MultimodalInputConnectStubTest, StubSetNapStatus_002, TestSize.Level1)
2474 {
2475     std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2476     MessageParcel data;
2477     MessageParcel reply;
2478     std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
2479     int32_t ret = stub->StubSetNapStatus(data, reply);
2480     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2481     state_ = ServiceRunningState::STATE_RUNNING;
2482     ret = stub->StubSetNapStatus(data, reply);
2483     EXPECT_NE(ret, RET_OK);
2484 }
2485 
2486 /**
2487  * @tc.name: StubInjectKeyEvent_002
2488  * @tc.desc: Test the function StubInjectKeyEvent
2489  * @tc.type: FUNC
2490  * @tc.require:
2491  */
2492 HWTEST_F(MultimodalInputConnectStubTest, StubInjectKeyEvent_002, TestSize.Level1)
2493 {
2494     std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2495     MessageParcel data;
2496     MessageParcel reply;
2497     std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
2498     int32_t ret = stub->StubInjectKeyEvent(data, reply);
2499     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2500     state_ = ServiceRunningState::STATE_RUNNING;
2501     ret = stub->StubInjectKeyEvent(data, reply);
2502     EXPECT_NE(ret, RET_OK);
2503 }
2504 
2505 /**
2506  * @tc.name: StubInjectPointerEvent_001
2507  * @tc.desc: Test the function StubInjectPointerEvent
2508  * @tc.type: FUNC
2509  * @tc.require:
2510  */
2511 HWTEST_F(MultimodalInputConnectStubTest, StubInjectPointerEvent_001, TestSize.Level1)
2512 {
2513     std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2514     MessageParcel data;
2515     MessageParcel reply;
2516     std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
2517     int32_t ret = stub->StubInjectPointerEvent(data, reply);
2518     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2519     state_ = ServiceRunningState::STATE_RUNNING;
2520     ret = stub->StubInjectPointerEvent(data, reply);
2521     EXPECT_NE(ret, RET_OK);
2522 }
2523 
2524 /**
2525  * @tc.name: StubSetTouchpadScrollRows_001
2526  * @tc.desc: Test the function StubSetTouchpadScrollRows
2527  * @tc.type: FUNC
2528  * @tc.require:
2529  */
2530 HWTEST_F(MultimodalInputConnectStubTest, StubSetTouchpadScrollRows_001, TestSize.Level1)
2531 {
2532     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2533     MessageParcel data;
2534     MessageParcel reply;
2535     int32_t returnCode = 65142800;
2536     int32_t ret = stub->StubSetTouchpadScrollRows(data, reply);
2537     EXPECT_EQ(ret, returnCode);
2538 }
2539 
2540 /**
2541  * @tc.name: StubSetTouchpadScrollRows_002
2542  * @tc.desc: Test the function StubSetTouchpadScrollRows
2543  * @tc.type: FUNC
2544  * @tc.require:
2545  */
2546 HWTEST_F(MultimodalInputConnectStubTest, StubSetTouchpadScrollRows_002, TestSize.Level1)
2547 {
2548     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2549     MessageParcel data;
2550     MessageParcel reply;
2551     std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
2552     int32_t ret = stub->StubSetTouchpadScrollRows(data, reply);
2553     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2554     state_ = ServiceRunningState::STATE_RUNNING;
2555     ret = stub->StubSetTouchpadScrollRows(data, reply);
2556     EXPECT_NE(ret, RET_OK);
2557 }
2558 
2559 /**
2560  * @tc.name: StubGetTouchpadScrollRows_001
2561  * @tc.desc: Test the function StubGetTouchpadScrollRows
2562  * @tc.type: FUNC
2563  * @tc.require:
2564  */
2565 HWTEST_F(MultimodalInputConnectStubTest, StubGetTouchpadScrollRows_001, TestSize.Level1)
2566 {
2567     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2568     MessageParcel data;
2569     MessageParcel reply;
2570     int32_t returnCode = 65142800;
2571     int32_t ret = stub->StubGetTouchpadScrollRows(data, reply);
2572     EXPECT_EQ(ret, returnCode);
2573 }
2574 
2575 /**
2576  * @tc.name: StubGetTouchpadScrollRows_002
2577  * @tc.desc: Test the function StubGetTouchpadScrollRows
2578  * @tc.type: FUNC
2579  * @tc.require:
2580  */
2581 HWTEST_F(MultimodalInputConnectStubTest, StubGetTouchpadScrollRows_002, TestSize.Level1)
2582 {
2583     std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2584     MessageParcel data;
2585     MessageParcel reply;
2586     std::atomic<ServiceRunningState> state_ = ServiceRunningState::STATE_NOT_START;
2587     int32_t ret = stub->StubGetTouchpadScrollRows(data, reply);
2588     EXPECT_EQ(ret, MMISERVICE_NOT_RUNNING);
2589     state_ = ServiceRunningState::STATE_RUNNING;
2590     ret = stub->StubGetTouchpadScrollRows(data, reply);
2591     EXPECT_NE(ret, RET_OK);
2592 }
2593 
2594 /**
2595  * @tc.name: StubAddInputEventFilter_111
2596  * @tc.desc: Test the function StubAddInputEventFilter
2597  * @tc.type: FUNC
2598  * @tc.require:
2599  */
2600 HWTEST_F(MultimodalInputConnectStubTest, StubAddInputEventFilter_111, TestSize.Level1)
2601 {
2602     SetPermission(SYSTEM_BASIC, g_basics, sizeof(g_basics) / sizeof(g_basics[0]));
2603     std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2604     MessageParcel data;
2605     MessageParcel reply;
2606     int32_t ret = stub->StubAddInputEventFilter(data, reply);
2607     int32_t returnCode = 201;
2608     EXPECT_EQ(ret, returnCode);
2609 }
2610 
2611 /**
2612  * @tc.name: StubRemoveInputEventFilter_111
2613  * @tc.desc: Test the function StubRemoveInputEventFilter
2614  * @tc.type: FUNC
2615  * @tc.require:
2616  */
2617 HWTEST_F(MultimodalInputConnectStubTest, StubRemoveInputEventFilter_111, TestSize.Level1)
2618 {
2619     SetPermission(SYSTEM_BASIC, g_basics, sizeof(g_basics) / sizeof(g_basics[0]));
2620     std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2621     MessageParcel data;
2622     MessageParcel reply;
2623     int32_t ret = stub->StubRemoveInputEventFilter(data, reply);
2624     int32_t returnCode = 201;
2625     EXPECT_EQ(ret, returnCode);
2626 }
2627 
2628 /**
2629  * @tc.name: StubSetPointerLocation_111
2630  * @tc.desc: Test the function StubSetPointerLocation
2631  * @tc.type: FUNC
2632  * @tc.require:
2633  */
2634 HWTEST_F(MultimodalInputConnectStubTest, StubSetPointerLocation_111, TestSize.Level1)
2635 {
2636     SetPermission(SYSTEM_BASIC, g_basics, sizeof(g_basics) / sizeof(g_basics[0]));
2637     std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2638     MessageParcel data;
2639     MessageParcel reply;
2640     int32_t ret = stub->StubSetPointerLocation(data, reply);
2641     int32_t returnCode = 201;
2642     EXPECT_EQ(ret, returnCode);
2643 }
2644 
2645 /**
2646  * @tc.name: StubAuthorize_111
2647  * @tc.desc: Test the function StubAuthorize
2648  * @tc.type: FUNC
2649  * @tc.require:
2650  */
2651 HWTEST_F(MultimodalInputConnectStubTest, StubAuthorize_111, TestSize.Level1)
2652 {
2653     SetPermission(SYSTEM_BASIC, g_basics, sizeof(g_basics) / sizeof(g_basics[0]));
2654     std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2655     MessageParcel data;
2656     MessageParcel reply;
2657     int32_t ret = stub->StubAuthorize(data, reply);
2658     int32_t returnCode = 201;
2659     EXPECT_EQ(ret, returnCode);
2660 }
2661 
2662 /**
2663  * @tc.name: StubSetCurrentUser_111
2664  * @tc.desc: Test the function StubSetCurrentUser
2665  * @tc.type: FUNC
2666  * @tc.require:
2667  */
2668 HWTEST_F(MultimodalInputConnectStubTest, StubSetCurrentUser_111, TestSize.Level1)
2669 {
2670     std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2671     MessageParcel data;
2672     MessageParcel reply;
2673     int32_t userId = 100;
2674     data.WriteInt32(userId);
2675     int32_t returnCode = -1;
2676     int32_t ret = stub->StubSetCurrentUser(data, reply);
2677     EXPECT_EQ(ret, returnCode);
2678 }
2679 
2680 /**
2681  * @tc.name: StubSetInputDeviceInputEnable_001
2682  * @tc.desc: Test the function StubSetInputDeviceInputEnable
2683  * @tc.type: FUNC
2684  * @tc.require:
2685  */
2686 HWTEST_F(MultimodalInputConnectStubTest, StubSetInputDeviceInputEnable_001, TestSize.Level1)
2687 {
2688     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2689     MessageParcel data;
2690     MessageParcel reply;
2691     MessageOption option;
2692     int32_t returnCode = 65142800;
2693     uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_INPUT_DEVICE_ENABLE);
2694     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2695     int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
2696     EXPECT_EQ(ret, returnCode);
2697 }
2698 
2699 /**
2700  * @tc.name: StubShiftAppPointerEvent_001
2701  * @tc.desc: Test the function StubShiftAppPointerEvent
2702  * @tc.type: FUNC
2703  * @tc.require:
2704  */
2705 HWTEST_F(MultimodalInputConnectStubTest, StubShiftAppPointerEvent_001, TestSize.Level1)
2706 {
2707     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2708     MessageParcel data;
2709     MessageParcel reply;
2710     MessageOption option;
2711     int32_t returnCode = MMISERVICE_NOT_RUNNING;
2712     uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SHIFT_APP_POINTER_EVENT);
2713     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2714     int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
2715     EXPECT_EQ(ret, returnCode);
2716 }
2717 
2718 /**
2719  * @tc.name: StubAddPreInputHandler_001
2720  * @tc.desc: Test the function StubShiftAppPointerEvent
2721  * @tc.type: FUNC
2722  * @tc.require:
2723  */
2724 HWTEST_F(MultimodalInputConnectStubTest, StubAddPreInputHandler_001, TestSize.Level1)
2725 {
2726     std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2727     MessageParcel data;
2728     MessageParcel reply;
2729     int32_t handlerId = 0;
2730     data.WriteInt32(handlerId);
2731     int32_t eventType = 0;
2732     data.WriteInt32(eventType);
2733     int32_t keysLen = 0;
2734     data.WriteInt32(keysLen);
2735     EXPECT_NO_FATAL_FAILURE(stub->StubAddPreInputHandler(data, reply));
2736 }
2737 
2738 /**
2739  * @tc.name: StubAddPreInputHandler_002
2740  * @tc.desc: Test the function StubShiftAppPointerEvent
2741  * @tc.type: FUNC
2742  * @tc.require:
2743  */
2744 HWTEST_F(MultimodalInputConnectStubTest, StubAddPreInputHandler_002, TestSize.Level1)
2745 {
2746     std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2747     MessageParcel data;
2748     MessageParcel reply;
2749     int32_t handlerId = 0;
2750     data.WriteInt32(handlerId);
2751     int32_t eventType = 0;
2752     data.WriteInt32(eventType);
2753     int32_t keysLen = 6;
2754     data.WriteInt32(keysLen);
2755     EXPECT_NO_FATAL_FAILURE(stub->StubAddPreInputHandler(data, reply));
2756 }
2757 
2758 /**
2759  * @tc.name: StubAddPreInputHandler_003
2760  * @tc.desc: Test the function StubShiftAppPointerEvent
2761  * @tc.type: FUNC
2762  * @tc.require:
2763  */
2764 HWTEST_F(MultimodalInputConnectStubTest, StubAddPreInputHandler_003, TestSize.Level1)
2765 {
2766     std::shared_ptr<MultimodalInputConnectStub>stub = std::make_shared<MMIService>();
2767     MessageParcel data;
2768     MessageParcel reply;
2769     int32_t handlerId = 0;
2770     data.WriteInt32(handlerId);
2771     int32_t eventType = 0;
2772     data.WriteInt32(eventType);
2773     int32_t keysLen = 4;
2774     data.WriteInt32(keysLen);
2775     EXPECT_NO_FATAL_FAILURE(stub->StubAddPreInputHandler(data, reply));
2776 }
2777 
2778 /**
2779  * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_013
2780  * @tc.desc: Test the function OnRemoteRequest
2781  * @tc.type: FUNC
2782  * @tc.require:
2783  */
2784 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_013, TestSize.Level1)
2785 {
2786     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2787     MessageParcel data;
2788     MessageParcel reply;
2789     MessageOption option;
2790     uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::ADD_PRE_INPUT_HANDLER);
2791     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2792     int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
2793     int32_t temp = stub->StubSetTouchpadScrollRows(data, reply);
2794     EXPECT_EQ(ret, temp);
2795     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::REMOVE_PRE_INPUT_HANDLER);
2796     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2797     ret = stub->OnRemoteRequest(code, data, reply, option);
2798     temp = stub->StubGetTouchpadScrollRows(data, reply);
2799     EXPECT_EQ(ret, temp);
2800     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_DOUBLE_TAP_DRAG_STATE);
2801     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2802     ret = stub->OnRemoteRequest(code, data, reply, option);
2803     temp = stub->StubGetTouchpadScrollRows(data, reply);
2804     EXPECT_EQ(ret, temp);
2805     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_DOUBLE_TAP_DRAG_STATE);
2806     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2807     ret = stub->OnRemoteRequest(code, data, reply, option);
2808     temp = stub->StubGetTouchpadScrollRows(data, reply);
2809     EXPECT_EQ(ret, temp);
2810     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::GET_CURSOR_SURFACE_ID);
2811     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2812     ret = stub->OnRemoteRequest(code, data, reply, option);
2813     temp = stub->StubGetTouchpadScrollRows(data, reply);
2814     EXPECT_EQ(ret, temp);
2815     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SUBSCRIBE_LONG_PRESS);
2816     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2817     ret = stub->OnRemoteRequest(code, data, reply, option);
2818     temp = stub->StubGetTouchpadScrollRows(data, reply);
2819     EXPECT_EQ(ret, temp);
2820 }
2821 
2822 /**
2823  * @tc.name: MultimodalInputConnectStubTest_OnRemoteRequest_014
2824  * @tc.desc: Test the function OnRemoteRequest
2825  * @tc.type: FUNC
2826  * @tc.require:
2827  */
2828 HWTEST_F(MultimodalInputConnectStubTest, OnRemoteRequest_014, TestSize.Level1)
2829 {
2830     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2831     MessageParcel data;
2832     MessageParcel reply;
2833     MessageOption option;
2834     uint32_t code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::UNSUBSCRIBE_LONG_PRESS);
2835     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2836     int32_t ret = stub->OnRemoteRequest(code, data, reply, option);
2837     int32_t temp = stub->StubSetTouchpadScrollRows(data, reply);
2838     EXPECT_EQ(ret, temp);
2839     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_CUSTOM_MOUSE_CURSOR);
2840     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2841     ret = stub->OnRemoteRequest(code, data, reply, option);
2842     temp = stub->StubGetTouchpadScrollRows(data, reply);
2843     EXPECT_EQ(ret, temp);
2844     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SET_MUILT_WINDOW_SCREEN_ID);
2845     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2846     ret = stub->OnRemoteRequest(code, data, reply, option);
2847     temp = stub->StubSetMultiWindowScreenId(data, reply);
2848     EXPECT_EQ(ret, temp);
2849     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::SUBSCRIBE_KEY_MONITOR);
2850     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2851     ret = stub->OnRemoteRequest(code, data, reply, option);
2852     temp = stub->StubSubscribeKeyMonitor(data, reply);
2853     EXPECT_EQ(ret, temp);
2854     code = static_cast<uint32_t>(MultimodalinputConnectInterfaceCode::UNSUBSCRIBE_KEY_MONITOR);
2855     data.WriteInterfaceToken(IMultimodalInputConnect::GetDescriptor());
2856     ret = stub->OnRemoteRequest(code, data, reply, option);
2857     temp = stub->StubUnsubscribeKeyMonitor(data, reply);
2858     EXPECT_EQ(ret, temp);
2859 }
2860 
2861 /**
2862  * @tc.name: StubSubscribeHotkey_001
2863  * @tc.desc: Test the function StubSubscribeHotkey
2864  * @tc.type: FUNC
2865  * @tc.require:
2866  */
2867 HWTEST_F(MultimodalInputConnectStubTest, StubSubscribeHotkey_001, TestSize.Level1)
2868 {
2869     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2870     MessageParcel data;
2871     MessageParcel reply;
2872     int32_t returnCode = 201;
2873     std::shared_ptr<MMIService> service = std::static_pointer_cast<MMIService>(stub);
2874     service->state_ = ServiceRunningState::STATE_RUNNING;
2875     int32_t ret = stub->StubSubscribeHotkey(data, reply);
2876     EXPECT_EQ(ret, returnCode);
2877 }
2878 
2879 /**
2880  * @tc.name: StubSetClientInfo_001
2881  * @tc.desc: Test the function StubSetClientInfo
2882  * @tc.type: FUNC
2883  * @tc.require:
2884  */
2885 HWTEST_F(MultimodalInputConnectStubTest, StubSetClientInfo_001, TestSize.Level1)
2886 {
2887     std::shared_ptr<MultimodalInputConnectStub> stub = std::make_shared<MMIService>();
2888     MessageParcel data;
2889     MessageParcel reply;
2890     int32_t returnCode = 201;
2891     std::shared_ptr<MMIService> service = std::static_pointer_cast<MMIService>(stub);
2892     service->state_ = ServiceRunningState::STATE_RUNNING;
2893     int32_t ret = stub->StubSetClientInfo(data, reply);
2894     EXPECT_EQ(ret, returnCode);
2895 }
2896 } // namespace MMI
2897 } // namespace OHOS