package com.lingniu.ingest.core.config;

import org.junit.jupiter.api.Test;

import java.lang.reflect.Method;
import java.lang.reflect.Modifier;

import static org.assertj.core.api.Assertions.assertThat;

class IngestCoreAutoConfigurationTest {

    @Test
    void beanPostProcessorFactoryMethodIsStaticToAvoidEarlyConfigurationInstantiation() throws Exception {
        Method method = IngestCoreAutoConfiguration.class.getDeclaredMethod(
                "annotationHandlerBeanPostProcessor");

        assertThat(Modifier.isStatic(method.getModifiers())).isTrue();
        assertThat(method.getParameterCount()).isZero();
    }
}
