### Question:
SpringSkillsAutoConfiguration { @Bean @ConditionalOnMissingBean(value=SpeechRequestDispatcher.class) public SpeechRequestDispatcher dispatcher() { return new BeanNameSpeechRequestDispatcher( (request) -> { Speech speech = new Speech(); speech.setSsml("<speak>I don't know what you're doing...</speak>"); SpeechCard card = new SpeechCard("Unknown", "Unknown intent"); SpeechResponse response = new SpeechResponse(speech, card); response.setEndSession(false); return response; }, (request) -> { Speech speech = new Speech(); speech.setSsml("<speak>Welcome</speak>"); SpeechCard card = new SpeechCard("Welcome", "Welcome"); SpeechResponse response = new SpeechResponse(speech, card); response.setEndSession(false); return response; }, new SessionEndedSpeechRequestHandler() { @Override public void handleSessionEndedRequest(SessionEndedSpeechRequest request) { logger.info("Session ended. Reason: " + request.getReason()); } }); }  @Bean @ConditionalOnMissingBean(value=SpeechRequestDispatcher.class) SpeechRequestDispatcher dispatcher();  }### Answer:
@Test public void shouldAutoConfigureSpringSkills() { this.contextRunner.withUserConfiguration(EmptyConfiguration.class) .run( context -> { assertThat(context).hasSingleBean(SpeechRequestDispatcher.class); assertThat(context.getBean(SpeechRequestDispatcher.class)) .isSameAs(context.getBean(SpringSkillsAutoConfiguration.class).dispatcher()); }); }
@Test public void shouldBackoffOnSpeechRequestDispatcherConfiguration() { this.contextRunner.withUserConfiguration(SpeechRequestDispatcherConfiguration.class) .run( context -> { assertThat(context).hasSingleBean(SpeechRequestDispatcher.class); assertThat(context.getBean(SpeechRequestDispatcher.class)) .isSameAs(context.getBean(SpeechRequestDispatcherConfiguration.class).dispatcher()); }); }