public void callTrack(JSONObject eventObject) {
        JSONObject jsonObject = new JSONObject();
        try {
            jsonObject.put("eventJSON", eventObject);
            if ("$AppStart".equals(eventObject.optString("event"))) {
                if (mFunctionListener == null) {
                    cacheData = jsonObject;
                    new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
                        @Override
                        public void run() {
                            cacheData = null;
                        }
                    }, 2 * 1000);
                    return;
                }
            }
            call("trackEvent",jsonObject);
        } catch (JSONException e) {
            SALog.printStackTrace(e);
        }
    }
@Test
    public void callTrack() {
        SensorsDataAPI sensorsDataAPI = SAHelper.initSensors(mApplication);
        sensorsDataAPI.addFunctionListener(new SAFunctionListener() {
            @Override
            public void call(String function, JSONObject args) {
                Assert.assertEquals("trackEvent", function);
            }
        });
        sensorsDataAPI.track("AppTest");
    }