package com.tuoheng.admin.mqtt;

import com.tuoheng.common.core.utils.SpringUtils;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest
public class MqttServiceTest {

    @Autowired
    private MqttProviderConfig mqttProvider;

    @Test
    public void testHello() {

        MqttProviderConfig client = SpringUtils.getBean(MqttProviderConfig.class);
        client.subscribe(" /v1/123456/environment/messag", 0);
    }

}
