@Override
    public void trackEvent(InputData input) {
        process(input);
    }
@Test
    public void trackEventH5() {
        initSensors();
        SensorsDataAPI.sharedInstance().setTrackEventCallBack(new SensorsDataTrackEventCallBack() {
            @Override
            public boolean onTrackEvent(String eventName, JSONObject eventProperties) {
                assertEquals("$WebClick", eventName);
                String version = DeviceUtils.getHarmonyOSVersion();
                if (TextUtils.isEmpty(version)) {
                    assertEquals(eventProperties.opt("$os"), "Android");
                    assertEquals(eventProperties.opt("$os_version"), DeviceUtils.getOS());
                } else {
                    assertEquals(eventProperties.opt("$os"), "HarmonyOS");
                    assertEquals(eventProperties.opt("$os_version"), version);
                }

                assertEquals(eventProperties.opt("$lib"), "js");
                assertEquals(eventProperties.opt("$lib_version"), "1.14.23");
                assertEquals(eventProperties.opt("$manufacturer"), DeviceUtils.getManufacturer());
                assertEquals(eventProperties.opt("$model"), DeviceUtils.getModel());
                assertEquals(eventProperties.opt("$brand"), DeviceUtils.getBrand());
                assertEquals(eventProperties.opt("$app_version"), AppInfoUtils.getAppVersionName(mApplication));
                int[] size = DeviceUtils.getDeviceSize(mApplication);
                assertEquals(eventProperties.opt("$screen_width"), size[0]);
                assertEquals(eventProperties.opt("$screen_height"), size[1]);
                assertEquals(eventProperties.opt("$carrier"), SensorsDataUtils.getOperator(mApplication));
                assertEquals(eventProperties.opt("$timezone_offset"), TimeUtils.getZoneOffset());
                assertEquals(eventProperties.opt("$app_id"), AppInfoUtils.getProcessName(mApplication));
                return true;
            }
        });
        InputData inputData = new InputData();
        inputData.setExtras("{\"server_url\":\"https://sdkdebugtest.datasink.sensorsdata.cn/sa.gif?project=default&token=cfb8b60e42e0ae9b\"," +
                "\"distinct_id\":\"181b8fcc33747-0e98015efae734-5f2b2f1c-277920-181b8fcc33bec\",\"lib\":{\"$lib\":\"js\",\"$lib_method\":\"code\",\"$lib_version\":\"1.14.23\"}," +
                "\"properties\":{\"$screen_height\":772,\"$screen_width\":360,\"$lib\":\"js\",\"$lib_version\":\"1.14.23\",\"$latest_traffic_source_type\":\"url的domain解析失败\",\"$latest_search_keyword\":\"url的domain解析失败\",\"$latest_referrer\":\"url的domain解析失败\",\"$device_id\":\"181b8fcc33747-0e98015efae734-5f2b2f1c-277920-181b8fcc33bec\",\"$element_type\":\"button\",\"$element_class_name\":\"\",\"$element_content\":\"test\",\"$url\":\"file:///android_asset/new_h5_test/index.html\",\"$url_path\":\"/android_asset/new_h5_test/index.html\",\"$title\":\"sdk demo ls\",\"$viewport_width\":360,\"$element_selector\":\"body > div:nth-of-type(1) > button:nth-of-type(1)\",\"timepppp\":\"2022-07-01 17:00:50.771\",\"$is_first_day\":false},\"anonymous_id\":\"181b8fcc33747-0e98015efae734-5f2b2f1c-277920-181b8fcc33bec\"," +
                "\"type\":\"track\",\"event\":\"$WebClick\",\"time\":1656666050772,\"_track_id\":887940781,\"_flush_time\":1656666050781}");
        TrackEventProcessor eventProcessor = new TrackEventProcessor(SensorsDataAPI.sharedInstance().getSAContextManager());
        eventProcessor.trackEvent(inputData);
    }