### Question:
ExternalLdapConfig implements ConnectionConfig { public void update(LdapDataLayerConfiguration config) { config.updateExternalLdapConfiguration(hosts, username, password, maxConnections, sslMode, heartbeat); } @Inject  ExternalLdapConfig(@Named(SessionConstants.SESSION_DEBUG) Debug debug); Set<LDAPURL> getLDAPURLs(); String getBindDN(); char[] getBindPassword(); int getMaxConnections(); int getLdapHeartbeat(); boolean isSSLMode(); boolean hasChanged(); void update(LdapDataLayerConfiguration config); @Override String toString(); static final int INVALID; }### Answer:
@Test public void shouldUseSystemPropertiesWrapperForNotifyChanges() throws Exception { PowerMockito.mockStatic(SystemProperties.class); ExternalLdapConfig config = new ExternalLdapConfig(debug); config.update(dataLayerConfiguration); PowerMockito.verifyStatic(SystemProperties.class,times(3)); SystemProperties.get(anyString()); PowerMockito.verifyStatic(SystemProperties.class); SystemProperties.getAsBoolean(anyString(), anyBoolean()); PowerMockito.verifyStatic(SystemProperties.class); SystemProperties.getAsInt(anyString(), eq(-1)); }
@Test public void shouldUseSystemPropertiesWrapperForNotifyChanges() throws Exception { PowerMockito.mockStatic(SystemProperties.class); ExternalLdapConfig config = new ExternalLdapConfig(debug); config.update(dataLayerConfiguration); PowerMockito.verifyStatic(times(3)); SystemProperties.get(anyString()); PowerMockito.verifyStatic(); SystemProperties.getAsBoolean(anyString(), anyBoolean()); PowerMockito.verifyStatic(); SystemProperties.getAsInt(anyString(), eq(-1)); }