Home / Class/ TestConfiguration Class — spring-boot Architecture

TestConfiguration Class — spring-boot Architecture

Architecture documentation for the TestConfiguration class in ApplicationAvailabilityBeanTests.java from the spring-boot codebase.

Entity Profile

Source Code

core/spring-boot/src/test/java/org/springframework/boot/availability/ApplicationAvailabilityBeanTests.java lines 151–169

	@Configuration
	static class TestConfiguration {

		@Bean
		MockLog mockLog() {
			List<String> logged = new ArrayList<>();
			MockLog log = mock(MockLog.class);
			given(log.isDebugEnabled()).willReturn(true);
			given(log.getLogged()).willReturn(logged);
			willAnswer((invocation) -> logged.add("" + invocation.getArguments()[0])).given(log).debug(any());
			return log;
		}

		@Bean
		ApplicationAvailabilityBean applicationAvailabilityBean(MockLog log) {
			return new ApplicationAvailabilityBean(log);
		}

	}

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free