@Override
    public void trackEvent(InputData input) {
        process(input);
    }
@Test
    public void trackEvent() throws JSONException {
        initSensors();
        SensorsDataAPI.sharedInstance().setTrackEventCallBack(new SensorsDataTrackEventCallBack() {
            @Override
            public boolean onTrackEvent(String eventName, JSONObject eventProperties) {
                assertEquals("UnitTestTrack", 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"), "Android");
                assertEquals(eventProperties.opt("$lib_version"), SensorsDataAPI.sharedInstance().getSDKVersion());
                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));
                Assert.assertTrue(eventProperties.optBoolean("$is_first_day"));
                return true;
            }
        });
        InputData inputData = new InputData();
        inputData.setEventName("UnitTestTrack");
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("track", "track");
        inputData.setProperties(jsonObject);
        TrackEventProcessor eventProcessor = new TrackEventProcessor(SensorsDataAPI.sharedInstance().getSAContextManager());
        eventProcessor.trackEvent(inputData);
    }