Package com.github.kristofa.brave

Source Code of com.github.kristofa.brave.EndPointSubmitterConfigTest

package com.github.kristofa.brave;

import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;

import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class EndPointSubmitterConfigTest {

    @Test
    public void test() {
        final AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(EndPointSubmitterConfig.class);
        try {
            final EndPointSubmitter bean1 = ctx.getBean(EndPointSubmitter.class);
            assertNotNull(bean1);
            final EndPointSubmitter bean2 = ctx.getBean(EndPointSubmitter.class);
            assertSame("Expect singleton.", bean1, bean2);

        } finally {
            ctx.close();
        }
    }

}
TOP

Related Classes of com.github.kristofa.brave.EndPointSubmitterConfigTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.