ProxyServiceImpl extends AbstractService implements ProxyService { @Override public void addProxy(ProxyModel model) { DcIdNameMapper mapper = new DcIdNameMapper.OneTimeMapper(dcService); proxyDao.insert(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 testAddProxy() { ProxyModel proxy3 = new ProxyModel().setActive(false).setDcName(dcNames[0]).setId(3).setUri("PROXYTCP: service.addProxy(proxy3); Assert.assertEquals(Lists.newArrayList(proxy1, proxy2, proxy3), service.getAllProxies()); }