LogViewEndpointAutoconfig { @ConditionalOnProperty(LOGGING_PATH) @ConditionalOnMissingBean(LogViewEndpoint.class) @Bean public LogViewEndpoint logViewEndpointWithDefaultPath(Environment environment, EndpointConfiguration configuration) { return new LogViewEndpoint(environment.getRequiredProperty(LOGGING_PATH), configuration.getStylesheets()); }  @ConditionalOnProperty(LOGGING_FILE) @ConditionalOnMissingBean(LogViewEndpoint.class) @Bean LogViewEndpoint logViewEndpointWithDefaultFile(Environment environment, EndpointConfiguration configuration); @ConditionalOnProperty(LOGGING_PATH) @ConditionalOnMissingBean(LogViewEndpoint.class) @Bean LogViewEndpoint logViewEndpointWithDefaultPath(Environment environment, EndpointConfiguration configuration); @ConditionalOnProperty(ENDPOINTS_LOGVIEW_PATH) @ConditionalOnMissingBean(LogViewEndpoint.class) @Bean LogViewEndpoint logViewEndpointWithDeviatingPath(Environment environment, EndpointConfiguration configuration); static final String LOGGING_FILE; static final String LOGGING_PATH; static final String ENDPOINTS_LOGVIEW_PATH; }
@Test public void shouldCreateBeanForDefaultPath() { assertThat(new LogViewEndpointAutoconfig().logViewEndpointWithDefaultPath(environment, configuration), notNullValue()); }