Java 类org.springframework.boot.actuate.endpoint.AbstractEndpoint 实例源码

项目:quickfixj-spring-boot-starter    文件:AbstractEndpointTests.java   
@Test
@SuppressWarnings("rawtypes")
public void isExplicitlyEnabled() throws Exception {
    this.context = new AnnotationConfigApplicationContext();
    PropertySource<?> propertySource = new MapPropertySource("test", Collections
            .<String, Object>singletonMap(this.property + ".enabled", false));
    this.context.getEnvironment().getPropertySources().addFirst(propertySource);
    this.context.register(this.configClass);
    this.context.refresh();
    ((AbstractEndpoint) getEndpointBean()).setEnabled(true);
    assertThat(getEndpointBean().isEnabled()).isTrue();
}