37 {
38 AccessibilityChannel accessibilityChannel =
39 new AccessibilityChannel(mock(DartExecutor.class), mock(FlutterJNI.class));
40 HashMap<String, Object> arguments = new HashMap<>();
41 arguments.put("type", "focus");
42 arguments.put("nodeId", 123);
43 AccessibilityChannel.AccessibilityMessageHandler handler =
44 mock(AccessibilityChannel.AccessibilityMessageHandler.class);
45 accessibilityChannel.setAccessibilityMessageHandler(handler);
46 BasicMessageChannel.Reply reply = mock(BasicMessageChannel.Reply.class);
47 accessibilityChannel.parsingMessageHandler.onMessage(arguments, reply);
48 verify(handler).onFocus(123);
49 }