ClientInfoServiceImpl implements ClientInfoService { @Override public boolean isUseProxiesEnabled() { if (useProxiesEnabled == null) { useProxiesEnabled = configurationService.getBooleanProperty("useProxies", true); log.info("useProxies=" + useProxiesEnabled); } return useProxiesEnabled; } @Autowired(required = true)  ClientInfoServiceImpl(ConfigurationService configurationService); @Override String getClientIp(HttpServletRequest request); @Override String getClientIp(String remoteIp, String xForwardedForHeaderValue); @Override boolean isUseProxiesEnabled();  }
@Test public void isUseProxiesEnabledTrue() { configurationService.setProperty("useProxies", true); clientInfoService = new ClientInfoServiceImpl(configurationService); assertTrue(clientInfoService.isUseProxiesEnabled()); }
@Test public void isUseProxiesEnabledFalse() { configurationService.setProperty("useProxies", false); clientInfoService = new ClientInfoServiceImpl(configurationService); assertFalse(clientInfoService.isUseProxiesEnabled()); }