import com.alibaba.csp.sentinel.dashboard.SentinelApplication;
import com.alibaba.csp.sentinel.dashboard.datasource.entity.MetricEntity;
import com.chushang.common.mongo.annotation.MongoDel;
import lombok.extern.slf4j.Slf4j;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest(classes = SentinelApplication.class)
public class Test {

    @org.junit.Test
    public void mongoDel(){
        MetricEntity metricEntity = new MetricEntity();
        Class<? extends MetricEntity> aClass = metricEntity.getClass();
        MongoDel mongoDel = aClass.getAnnotation(MongoDel.class);
        System.out.println(mongoDel.logic());
    }

}
