@ -20,7 +20,8 @@ import org.junit.Rule;
import org.junit.Test ;
import org.junit.Test ;
import org.junit.rules.ExpectedException ;
import org.junit.rules.ExpectedException ;
import org.springframework.boot.actuate.endpoint.annotation.EndpointExposure ;
import org.springframework.boot.actuate.endpoint.DefaultEnablement ;
import org.springframework.boot.actuate.endpoint.EndpointExposure ;
import org.springframework.boot.test.util.TestPropertyValues ;
import org.springframework.boot.test.util.TestPropertyValues ;
import org.springframework.mock.env.MockEnvironment ;
import org.springframework.mock.env.MockEnvironment ;
import org.springframework.util.ObjectUtils ;
import org.springframework.util.ObjectUtils ;
@ -38,306 +39,238 @@ public class EndpointEnablementProviderTests {
public ExpectedException thrown = ExpectedException . none ( ) ;
public ExpectedException thrown = ExpectedException . none ( ) ;
@Test
@Test
public void cannotDetermineEnablementWithEmptyEndpoint ( ) {
public void defaultEnablementDisabled ( ) {
this . thrown . expect ( IllegalArgumentException . class ) ;
EndpointEnablement enablement = getEndpointEnablement ( "foo" ,
this . thrown . expectMessage ( "Endpoint id must have a value" ) ;
DefaultEnablement . DISABLED ) ;
getEndpointEnablement( " " , true ) ;
validate( enablement , false , "endpoint 'foo' is disabled by default" ) ;
}
}
@Test
@Test
public void cannotDetermineEnablementOfEndpointAll ( ) {
public void defaultEnablementDisabledWithGeneralEnablement ( ) {
this . thrown . expect ( IllegalArgumentException . class ) ;
EndpointEnablement enablement = getEndpointEnablement ( "foo" ,
this . thrown . expectMessage ( "Endpoint id 'default' is a reserved value and cannot "
DefaultEnablement . DISABLED , "endpoints.default.enabled=true" ) ;
+ "be used by an endpoint" ) ;
validate ( enablement , false , "endpoint 'foo' is disabled by default" ) ;
getEndpointEnablement ( "default" , true ) ;
}
}
@Test
@Test
public void generalEnabledByDefault ( ) {
public void defaultEnablementDisabledWithGeneralTechEnablement ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "foo" , true ) ;
EndpointEnablement enablement = getEndpointEnablement ( "foo" ,
validate ( enablement , true , "endpoint 'foo' is enabled by default" ) ;
DefaultEnablement . DISABLED , EndpointExposure . WEB ,
}
"endpoints.default.web.enabled=true" ) ;
validate ( enablement , false , "endpoint 'foo' (web) is disabled by default" ) ;
@Test
public void generalDisabledViaSpecificProperty ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "foo" , true ,
"endpoints.foo.enabled=false" ) ;
validate ( enablement , false , "found property endpoints.foo.enabled" ) ;
}
@Test
public void generalDisabledViaGeneralProperty ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "foo" , true ,
"endpoints.default.enabled=false" ) ;
validate ( enablement , false , "found property endpoints.default.enabled" ) ;
}
}
@Test
@Test
public void generalEnabledOverrideViaSpecificProperty ( ) {
public void defaultEnablementDisabledWithOverride ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "foo" , true ,
EndpointEnablement enablement = getEndpointEnablement ( "foo" ,
"endpoints.default.enabled=false" , "endpoints.foo.enabled=true" ) ;
DefaultEnablement . DISABLED , "endpoints.foo.enabled=true" ) ;
validate ( enablement , true , "found property endpoints.foo.enabled" ) ;
validate ( enablement , true , "found property endpoints.foo.enabled" ) ;
}
}
@Test
@Test
public void generalEnabledOverrideViaSpecificWebProperty ( ) {
public void defaultEnablementDisabledWithTechOverride ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "foo" , true ,
EndpointEnablement enablement = getEndpointEnablement ( "foo" ,
"endpoints.foo.enabled=false" , "endpoints.foo.web.enabled=true" ) ;
DefaultEnablement . DISABLED , EndpointExposure . WEB ,
"endpoints.foo.web.enabled=true" ) ;
validate ( enablement , true , "found property endpoints.foo.web.enabled" ) ;
validate ( enablement , true , "found property endpoints.foo.web.enabled" ) ;
}
}
@Test
@Test
public void generalEnabledOverrideViaSpecificJmxProperty ( ) {
public void defaultEnablementDisabledWithIrrelevantTechOverride ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "foo" , true ,
EndpointEnablement enablement = getEndpointEnablement ( "foo" ,
"endpoints.foo.enabled=false" , "endpoints.foo.jmx.enabled=true" ) ;
DefaultEnablement . DISABLED , EndpointExposure . WEB ,
validate ( enablement , true , "found property endpoints.foo.jmx.enabled" ) ;
"endpoints.foo.jmx.enabled=true" ) ;
}
validate ( enablement , false , "endpoint 'foo' (web) is disabled by default" ) ;
@Test
public void generalEnabledOverrideViaSpecificAnyProperty ( ) {
validate ( getEndpointEnablement ( "foo" , true , "endpoints.foo.enabled=false" ,
"endpoints.foo.web.enabled=false" , "endpoints.foo.jmx.enabled=true" ) ,
true , "found property endpoints.foo.jmx.enabled" ) ;
}
@Test
public void generalEnabledOverrideViaGeneralWebProperty ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "foo" , true ,
"endpoints.default.enabled=false" , "endpoints.default.web.enabled=true" ) ;
validate ( enablement , true , "found property endpoints.default.web.enabled" ) ;
}
@Test
public void generalEnabledOverrideViaGeneralJmxProperty ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "foo" , true ,
"endpoints.default.enabled=false" , "endpoints.default.jmx.enabled=true" ) ;
validate ( enablement , true , "found property endpoints.default.jmx.enabled" ) ;
}
@Test
public void generalEnabledOverrideViaGeneralAnyProperty ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "foo" , true ,
"endpoints.default.enabled=false" , "endpoints.default.web.enabled=false" ,
"endpoints.default.jmx.enabled=true" ) ;
validate ( enablement , true , "found property endpoints.default.jmx.enabled" ) ;
}
@Test
public void generalDisabledEvenWithEnabledGeneralProperties ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "foo" , true ,
"endpoints.default.enabled=true" , "endpoints.default.web.enabled=true" ,
"endpoints.default.jmx.enabled=true" , "endpoints.foo.enabled=false" ) ;
validate ( enablement , false , "found property endpoints.foo.enabled" ) ;
}
@Test
public void generalDisabledByDefaultWithAnnotationFlag ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "bar" , false ) ;
validate ( enablement , false , "endpoint 'bar' is disabled by default" ) ;
}
@Test
public void generalDisabledByDefaultWithAnnotationFlagEvenWithGeneralProperty ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "bar" , false ,
"endpoints.default.enabled=true" ) ;
validate ( enablement , false , "endpoint 'bar' is disabled by default" ) ;
}
@Test
public void generalDisabledByDefaultWithAnnotationFlagEvenWithGeneralWebProperty ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "bar" , false ,
"endpoints.default.web.enabled=true" ) ;
validate ( enablement , false , "endpoint 'bar' is disabled by default" ) ;
}
@Test
public void generalDisabledByDefaultWithAnnotationFlagEvenWithGeneralJmxProperty ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "bar" , false ,
"endpoints.default.jmx.enabled=true" ) ;
validate ( enablement , false , "endpoint 'bar' is disabled by default" ) ;
}
}
@Test
@Test
public void generalEnabledOverrideWithAndAnnotationFlagAndSpecificProperty ( ) {
public void defaultEnablementEnabled ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "bar" , false ,
EndpointEnablement enablement = getEndpointEnablement ( "bar" ,
"endpoints.bar.enabled=true" ) ;
DefaultEnablement . ENABLED ) ;
validate ( enablement , true , " found property endpoints.bar.enabled ") ;
validate ( enablement , true , "endpoint 'bar' is enabled by default" ) ;
}
}
@Test
@Test
public void generalEnabledOverrideWithAndAnnotationFlagAndSpecificWebProperty ( ) {
public void defaultEnablementEnabledWithGeneralDisablement ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "bar" , false ,
EndpointEnablement enablement = getEndpointEnablement ( "bar" ,
"endpoints.bar.web.enabled=tru e") ;
DefaultEnablement . ENABLED , "endpoints.default.enabled=false" ) ;
validate ( enablement , true , " found property endpoints.bar.web.enabled ") ;
validate ( enablement , true , "endpoint 'bar' is enabled by default" ) ;
}
}
@Test
@Test
public void generalEnabledOverrideWithAndAnnotationFlagAndSpecificJmxProperty ( ) {
public void defaultEnablementEnabledWithGeneralTechDisablement ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "bar" , false ,
EndpointEnablement enablement = getEndpointEnablement ( "bar" ,
"endpoints.bar.jmx.enabled=true" ) ;
DefaultEnablement . ENABLED , EndpointExposure . JMX ,
validate ( enablement , true , "found property endpoints.bar.jmx.enabled" ) ;
"endpoints.default.jmx.enabled=false" ) ;
validate ( enablement , true , "endpoint 'bar' (jmx) is enabled by default" ) ;
}
}
@Test
@Test
public void generalEnabledOverrideWithAndAnnotationFlagAndAnyProperty ( ) {
public void defaultEnablementEnabledWithOverride ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "bar" , false ,
EndpointEnablement enablement = getEndpointEnablement ( "bar" ,
"endpoints.bar.web.enabled=false" , "endpoints.bar.jmx.enabled=tru e") ;
DefaultEnablement . ENABLED , "endpoints.bar.enabled=false" ) ;
validate ( enablement , tru e, "found property endpoints.bar .jmx .enabled") ;
validate ( enablement , false , "found property endpoints.bar.enabled" ) ;
}
}
@Test
@Test
public void specificEnabledByDefault ( ) {
public void defaultEnablementEnabledWithTechOverride ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "foo" , true ,
EndpointEnablement enablement = getEndpointEnablement ( "bar" ,
EndpointExposure . JMX ) ;
DefaultEnablement . ENABLED , EndpointExposure . JMX ,
validate ( enablement , true , "endpoint 'foo' (jmx) is enabled by default" ) ;
"endpoints.bar.jmx.enabled=false" ) ;
validate ( enablement , false , "found property endpoints.bar.jmx.enabled" ) ;
}
}
@Test
@Test
public void specificDisabledViaEndpointProperty ( ) {
public void defaultEnablementEnabledWithIrrelevantTechOverride ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "foo" , true ,
EndpointEnablement enablement = getEndpointEnablement ( "bar" ,
EndpointExposure . WEB , "endpoints.foo.enabled=false" ) ;
DefaultEnablement . ENABLED , EndpointExposure . JMX ,
validate ( enablement , false , "found property endpoints.foo.enabled" ) ;
"endpoints.bar.web.enabled=false" ) ;
validate ( enablement , true , "endpoint 'bar' (jmx) is enabled by default" ) ;
}
}
@Test
@Test
public void specificDisabledViaTechProperty ( ) {
public void defaultEnablementNeutral ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "foo" , true ,
EndpointEnablement enablement = getEndpointEnablement ( "biz" ,
EndpointExposure . WEB , "endpoints.foo.web.enabled=false" ) ;
DefaultEnablement . NEUTRAL ) ;
validate ( enablement , false , "found property endpoints.foo.web.enabled" ) ;
validate ( enablement , true ,
"endpoint 'biz' is enabled (default)" ) ;
}
}
@Test
@Test
public void specificNotDisabledViaUnrelatedTechProperty ( ) {
public void defaultEnablementNeutralWeb ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "foo" , true ,
EndpointEnablement enablement = getEndpointEnablement ( "biz" ,
EndpointExposure . JMX , "endpoints.foo.web.enabled=false" ) ;
DefaultEnablement . NEUTRAL , EndpointExposure . WEB ) ;
validate ( enablement , true , "endpoint 'foo' (jmx) is enabled by default" ) ;
validate ( enablement , false ,
"endpoint 'default' (web) is disabled by default" ) ;
}
}
@Test
@Test
public void specificDisabledViaGeneralProperty ( ) {
public void defaultEnablementNeutralJmx ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "foo" , true ,
EndpointEnablement enablement = getEndpointEnablement ( "biz" ,
EndpointExposure . JMX , "endpoints.default.enabled=false" ) ;
DefaultEnablement . NEUTRAL , EndpointExposure . JMX ) ;
validate ( enablement , false , "found property endpoints.default.enabled" ) ;
validate ( enablement , true ,
"endpoint 'biz' (jmx) is enabled (default for jmx endpoints)" ) ;
}
}
@Test
@Test
public void specificEnabledOverrideViaEndpointProperty ( ) {
public void defaultEnablementNeutralWithGeneralDisablement ( ) {
EndpointEnablement enablement = getEndpointEnablement ( " foo", true ,
EndpointEnablement enablement = getEndpointEnablement ( " biz" ,
EndpointExposure. WEB , "endpoints.default.enabled=false" ,
DefaultEnablement. NEUTRAL , "endpoints.default.enabled=false" ) ;
"endpoints.foo.enabled=true" ) ;
validate ( enablement , false ,
validate ( enablement , true , "found property endpoints.foo .enabled") ;
"found property endpoints.default .enabled") ;
}
}
@Test
@Test
public void specificEnabledOverrideViaTechProperty ( ) {
public void defaultEnablementNeutralWebWithTechDisablement ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "foo" , true ,
EndpointEnablement enablement = getEndpointEnablement ( "biz" ,
EndpointExposure . WEB , "endpoints.foo.enabled=false" ,
DefaultEnablement . NEUTRAL , EndpointExposure . JMX ,
"endpoints.foo.web.enabled=true" ) ;
"endpoints.default.jmx.enabled=false" ) ;
validate ( enablement , true , "found property endpoints.foo.web.enabled" ) ;
validate ( enablement , false ,
"found property endpoints.default.jmx.enabled" ) ;
}
}
@Test
@Test
public void specificEnabledOverrideHasNotEffectWithUnrelatedTechProperty ( ) {
public void defaultEnablementNeutralTechTakesPrecedence ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "foo" , true ,
EndpointEnablement enablement = getEndpointEnablement ( "biz" ,
EndpointExposure . WEB , "endpoints.foo.enabled=false" ,
DefaultEnablement . NEUTRAL , EndpointExposure . JMX ,
"endpoints.foo.jmx.enabled=true" ) ;
"endpoints.default.enabled=true" ,
validate ( enablement , false , "found property endpoints.foo.enabled" ) ;
"endpoints.default.jmx.enabled=false" ) ;
validate ( enablement , false ,
"found property endpoints.default.jmx.enabled" ) ;
}
}
@Test
@Test
public void specificEnabledOverrideViaGeneralWebProperty ( ) {
public void defaultEnablementNeutralWebWithTechEnablement ( ) {
EndpointEnablement enablement = getEndpointEnablement ( " foo", true ,
EndpointEnablement enablement = getEndpointEnablement ( " biz" ,
EndpointExposure. WEB , "endpoints.default.enabled=false" ,
DefaultEnablement. NEUTRAL , EndpointExposure . WEB ,
"endpoints.default.web.enabled=true" ) ;
"endpoints.default.web.enabled=true" ) ;
validate ( enablement , true , "found property endpoints.default.web.enabled" ) ;
validate ( enablement , true ,
}
"found property endpoints.default.web.enabled" ) ;
@Test
public void specificEnabledOverrideHasNoEffectWithUnrelatedTechProperty ( ) {
validate ( getEndpointEnablement ( "foo" , true , EndpointExposure . JMX ,
"endpoints.default.enabled=false" , "endpoints.default.web.enabled=true" ) ,
false , "found property endpoints.default.enabled" ) ;
}
@Test
public void specificDisabledWithEndpointPropertyEvenWithEnabledGeneralProperties ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "foo" , true ,
EndpointExposure . WEB , "endpoints.default.enabled=true" ,
"endpoints.default.web.enabled=true" ,
"endpoints.default.jmx.enabled=true" , "endpoints.foo.enabled=false" ) ;
validate ( enablement , false , "found property endpoints.foo.enabled" ) ;
}
}
@Test
@Test
public void specificDisabledWithTechPropertyEvenWithEnabledGeneralProperties ( ) {
public void defaultEnablementNeutralWebWithUnrelatedTechDisablement ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "foo" , true ,
EndpointEnablement enablement = getEndpointEnablement ( "biz" ,
EndpointExposure . WEB , "endpoints.default.enabled=true" ,
DefaultEnablement . NEUTRAL , EndpointExposure . JMX ,
"endpoints.default.web.enabled=true" ,
"endpoints.default.web.enabled=false" ) ;
"endpoints.default.jmx.enabled=true" , "endpoints.foo.enabled=true" ,
validate ( enablement , true ,
"endpoints.foo.web.enabled=false" ) ;
"endpoint 'biz' (jmx) is enabled (default for jmx endpoints)" ) ;
validate ( enablement , false , "found property endpoints.foo.web.enabled" ) ;
}
}
@Test
@Test
public void specificDisabledByDefaultWithAnnotationFlag ( ) {
public void defaultEnablementNeutralWithOverride ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "bar" , false ,
EndpointEnablement enablement = getEndpointEnablement ( "biz" ,
EndpointExposure . WEB ) ;
DefaultEnablement . NEUTRAL , "endpoints.biz.enabled=false" ) ;
validate ( enablement , false , "endpoint 'bar' (web) is disabled by default" ) ;
validate ( enablement , false ,
"found property endpoints.biz.enabled" ) ;
}
}
@Test
@Test
public void specificDisabledByDefaultWithAnnotationFlagEvenWithGeneralProperty ( ) {
public void defaultEnablementNeutralWebWithOverride ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "bar" , false ,
EndpointEnablement enablement = getEndpointEnablement ( "biz" ,
EndpointExposure . WEB , "endpoints.default.enabled=true" ) ;
DefaultEnablement . NEUTRAL , EndpointExposure . WEB ,
validate ( enablement , false , "endpoint 'bar' (web) is disabled by default" ) ;
"endpoints.biz.web.enabled=true" ) ;
validate ( enablement , true ,
"found property endpoints.biz.web.enabled" ) ;
}
}
@Test
@Test
public void specificDisabledByDefaultWithAnnotationFlagEvenWithGeneralWebProperty ( ) {
public void defaultEnablementNeutralJmxWithOverride ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "bar" , false ,
EndpointEnablement enablement = getEndpointEnablement ( "biz" ,
EndpointExposure . WEB , "endpoints.default.web.enabled=true" ) ;
DefaultEnablement . NEUTRAL , EndpointExposure . JMX ,
validate ( enablement , false , "endpoint 'bar' (web) is disabled by default" ) ;
"endpoints.biz.jmx.enabled=false" ) ;
validate ( enablement , false ,
"found property endpoints.biz.jmx.enabled" ) ;
}
}
@Test
@Test
public void specificDisabledByDefaultWithAnnotationFlagEvenWithGeneralJmxProperty ( ) {
public void defaultEnablementNeutralTechTakesPrecedenceOnEverything ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "bar" , false ,
EndpointEnablement enablement = getEndpointEnablement ( "biz" ,
EndpointExposure . WEB , "endpoints.default.jmx.enabled=true" ) ;
DefaultEnablement . NEUTRAL , EndpointExposure . JMX ,
validate ( enablement , false , "endpoint 'bar' (web) is disabled by default" ) ;
"endpoints.default.enabled=false" ,
"endpoints.default.jmx.enabled=false" ,
"endpoints.biz.enabled=false" ,
"endpoints.biz.jmx.enabled=true" ) ;
validate ( enablement , true ,
"found property endpoints.biz.jmx.enabled" ) ;
}
}
@Test
@Test
public void specificEnabledOverrideWithAndAnnotationFlagAndEndpointProperty ( ) {
public void defaultEnablementNeutralSpecificTakesPrecedenceOnDefaults ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "bar" , false ,
EndpointEnablement enablement = getEndpointEnablement ( "biz" ,
EndpointExposure . WEB , "endpoints.bar.enabled=true" ) ;
DefaultEnablement . NEUTRAL , EndpointExposure . JMX ,
validate ( enablement , true , "found property endpoints.bar.enabled" ) ;
"endpoints.default.enabled=false" ,
"endpoints.default.jmx.enabled=false" ,
"endpoints.biz.enabled=true" ) ;
validate ( enablement , true ,
"found property endpoints.biz.enabled" ) ;
}
}
@Test
@Test
public void specificEnabledOverrideWithAndAnnotationFlagAndTechProperty ( ) {
public void defaultEnablementNeutralDefaultTechTakesPrecedenceOnGeneralDefault ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "bar" , false ,
EndpointEnablement enablement = getEndpointEnablement ( "biz" ,
EndpointExposure . WEB , "endpoints.bar.web.enabled=true" ) ;
DefaultEnablement . NEUTRAL , EndpointExposure . JMX ,
validate ( enablement , true , "found property endpoints.bar.web.enabled" ) ;
"endpoints.default.enabled=false" ,
}
"endpoints.default.jmx.enabled=true" ) ;
validate ( enablement , true ,
@Test
"found property endpoints.default.jmx.enabled" ) ;
public void specificEnabledOverrideWithAndAnnotationFlagHasNoEffectWithUnrelatedTechProperty ( ) {
EndpointEnablement enablement = getEndpointEnablement ( "bar" , false ,
EndpointExposure . WEB , "endpoints.bar.jmx.enabled=true" ) ;
validate ( enablement , false , "endpoint 'bar' (web) is disabled by default" ) ;
}
}
private EndpointEnablement getEndpointEnablement ( String id , boolean enabledByDefault ,
private EndpointEnablement getEndpointEnablement ( String id ,
String. . . environment ) {
DefaultEnablement enabledByDefault , String . . . environment ) {
return getEndpointEnablement ( id , enabledByDefault , null , environment ) ;
return getEndpointEnablement ( id , enabledByDefault , null , environment ) ;
}
}
private EndpointEnablement getEndpointEnablement ( String id , boolean enabledByDefault ,
private EndpointEnablement getEndpointEnablement ( String id ,
EndpointExposure exposure , String . . . environment ) {
DefaultEnablement enabledByDefault , EndpointExposure exposure ,
String . . . environment ) {
MockEnvironment env = new MockEnvironment ( ) ;
MockEnvironment env = new MockEnvironment ( ) ;
TestPropertyValues . of ( environment ) . applyTo ( env ) ;
TestPropertyValues . of ( environment ) . applyTo ( env ) ;
EndpointEnablementProvider provider = new EndpointEnablementProvider ( env ) ;
EndpointEnablementProvider provider = new EndpointEnablementProvider ( env ) ;
return provider . getEndpointEnablement ( id , enabledByDefault , exposure ) ;
if ( exposure ! = null ) {
return provider . getEndpointEnablement ( id , enabledByDefault , exposure ) ;
}
return provider . getEndpointEnablement ( id , enabledByDefault ) ;
}
}
private void validate ( EndpointEnablement enablement , boolean enabled ,
private void validate ( EndpointEnablement enablement , boolean enabled ,