@Override
    public void trackEvent(InputData input) {
        process(input);
    }
@Test
    public void trackEventItem() throws JSONException {
        initSensors();
        String itemType = "product_id", itemId = "100";
        InputData inputData = new InputData();
        inputData.setEventType(EventType.ITEM_DELETE);
        inputData.setItemId(itemId);
        inputData.setItemType(itemType);
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("item", "item");
        inputData.setProperties(jsonObject);
        TrackEventProcessor eventProcessor = new TrackEventProcessor(SensorsDataAPI.sharedInstance().getSAContextManager());
        eventProcessor.trackEvent(inputData);
        // 检查事件类型和属性
        try {
            Thread.sleep(1500);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        String eventData = DatabaseUtilsTest.loadEventFromDb(mApplication);
        assertNotNull(eventData);
        JSONObject jsonData = new JSONObject(eventData);
        ProfileTestUtils.checkItemEvent(jsonData, "item_delete", itemType, itemId);
        JSONObject propertyJson = jsonData.optJSONObject("properties");
        assertNotNull(propertyJson);
        assertEquals("item", propertyJson.opt("item"));
    }