package com.union.ai.api.client.service.impl;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.union.BaseTest;
import com.union.ai.api.client.service.LogWriterService;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import static org.junit.Assert.*;


public class LogWriterServiceImplTest extends BaseTest {

    @Autowired
    private LogWriterService logWriterService;

    @Test
    public void asynWriteLog() throws InterruptedException {
        JSONObject object = new JSONObject();
        object.put("name", "车是");
        object.put("id", "12345");
        String log = logWriterService.asynWriteLog("123445", object.toString());
        System.out.println(log);
        Thread.sleep(1000);
    }
}