@ -139,9 +139,22 @@ public class ManagementSecurityAutoConfigurationTests {
public void testOverrideAuthenticationManager ( ) throws Exception {
this . context = new AnnotationConfigWebApplicationContext ( ) ;
this . context . setServletContext ( new MockServletContext ( ) ) ;
this . context . register ( TestConfiguration . class ,
this . context . register ( TestConfiguration . class , SecurityAutoConfiguration . class ,
ManagementSecurityAutoConfiguration . class ,
EndpointAutoConfiguration . class ,
ManagementServerPropertiesAutoConfiguration . class ,
PropertyPlaceholderAutoConfiguration . class ) ;
this . context . refresh ( ) ;
assertEquals ( this . context . getBean ( TestConfiguration . class ) . authenticationManager ,
this . context . getBean ( AuthenticationManager . class ) ) ;
}
SecurityAutoConfiguration . class , ManagementSecurityAutoConfiguration . class ,
@Test
public void testSecurityPropertiesNotAvailable ( ) throws Exception {
this . context = new AnnotationConfigWebApplicationContext ( ) ;
this . context . setServletContext ( new MockServletContext ( ) ) ;
this . context . register ( TestConfiguration . class ,
ManagementSecurityAutoConfiguration . class ,
EndpointAutoConfiguration . class ,
ManagementServerPropertiesAutoConfiguration . class ,
PropertyPlaceholderAutoConfiguration . class ) ;