ProxyServiceImpl extends AbstractService implements ProxyService { @Override public void updateProxy(ProxyModel model) { DcIdNameMapper mapper = new DcIdNameMapper.OneTimeMapper(dcService); proxyDao.update(model.toProxyTbl(mapper)); }  @Override List<ProxyModel> getActiveProxies(); @Override List<ProxyModel> getAllProxies(); @Override List<ProxyModel> getMonitorActiveProxies(); @Override void updateProxy(ProxyModel model); @Override void deleteProxy(long id); @Override void addProxy(ProxyModel model); @Override List<ProxyTbl> getActiveProxyTbls(); @Override ProxyChain getProxyChain(String backupDcId, String clusterId, String shardId); @Override ProxyChain getProxyChain(String tunnelId); @Override List<TunnelInfo> getProxyTunnels(String dcId, String ip); @Override List<ProxyChain> getProxyChains(String backupDcId, String clusterId); @Override List<ProxyPingStatsModel> getProxyMonitorCollectors(String dcName); @Override List<ProxyInfoModel> getAllProxyInfo(); @Override RetMessage deleteProxyChain(List<HostPort> proxies);  }
@Test public void testUpdateProxy() { String newUri = "TCP: proxy1.setUri(newUri); service.updateProxy(proxy1); ProxyModel proxy = null; for(ProxyModel mode : service.getAllProxies()) { if(mode.getId() == proxy1.getId()) { proxy = mode; break; } } Assert.assertEquals(newUri, proxy.getUri()); }