### Question:
MvcInitializer extends AbstractAnnotationConfigDispatcherServletInitializer { @Override protected Class<?>[] getServletConfigClasses() { return new Class[]{DataSourceConfig.class, JdbcConfig.class, ServiceConfig.class, MvcConfig.class, SecurityConfig.class}; }    }### Answer:
@Test @DisplayName("[Spring Security無し] getServletConfigClasses()がJava Configの配列を返す") @Disabled("Spring Security有りでテストするため無効化") public void getServletConfigClassesTest() { Class[] expectedClasses = {DataSourceConfig.class, JdbcConfig.class, ServiceConfig.class, MvcConfig.class}; Class<?>[] configClasses = mvcInitializer.getServletConfigClasses(); assertArrayEquals(expectedClasses, configClasses, "config classes not correct"); }
@Test @DisplayName("[Spring Security有り] getServletConfigClasses()がJava Configの配列を返す") public void getServletConfigClassesTest_withSpringSecurity() { Class[] expectedClasses = {DataSourceConfig.class, JdbcConfig.class, ServiceConfig.class, MvcConfig.class, SecurityConfig.class}; Class<?>[] configClasses = mvcInitializer.getServletConfigClasses(); assertArrayEquals(expectedClasses, configClasses, "config classes not correct"); }