### Question:
DomainsManager { public void easyRemvIP4Dom(String domName, List<IpAddress> ips) throws Exception { Lock lock = dom2LockMap.get(domName); if (lock == null) { throw new IllegalStateException("no lock for " + domName + ", operation is disabled now."); } try { lock.lock(); Domain dom = chooseDomMap().get(domName); if (dom == null) { throw new IllegalArgumentException("domain doesn't exist: " + domName); } Datum datum = RaftCore.getDatum(UtilsAndCommons.getIPListStoreKey(dom)); String oldJson = StringUtils.EMPTY; List<IpAddress> currentIPs = dom.allIPs(); if (currentIPs.size() <= 0) { return; } Map<String, IpAddress> map = new ConcurrentHashMap<String, IpAddress>(currentIPs.size()); for (IpAddress ipAddress : currentIPs) { map.put(ipAddress.toIPAddr(), ipAddress); } if (datum != null) { oldJson = datum.value; } List<IpAddress> ipAddrs = setValid(oldJson, map); ipAddrs.removeAll(ips); RaftCore.doSignalPublish(UtilsAndCommons.getIPListStoreKey(dom), JSON.toJSONString(ipAddrs)); } finally { lock.unlock(); } } DomainsManager(); Map<String, Lock> getDom2LockMap(); Map<String, Domain> chooseDomMap(); void addUpdatedDom2Queue(String domName, String serverIP, String checksum); void updatedDom2(String domName, String serverIP); Set<String> getAllDomNames(); List<String> getAllDomNamesList(); void setAllDomNames(List<String> allDomNames); Set<String> getAllDomNamesCache(); List<Domain> getResponsibleDoms(); int getResponsibleIPCount(); void easyRemoveDom(String domName); void easyAddOrReplaceDom(Domain newDom); void easyAddIP4Dom(String domName, List<IpAddress> ips, long timestamp, long term); void easyRemvIP4Dom(String domName, List<IpAddress> ips); Domain getDomain(String domName); List<Domain> searchDomains(String regex); int getDomCount(); int getIPCount(); Map<String, Domain> getRaftDomMap(); int getPagedDom(int startPage, int pageSize, String keyword, List<Domain> domainList); Lock addLock(String domName); Condition addCondtion(String domName);  }### Answer:
@Test public void easyRemvIP4Dom() throws Exception { VirtualClusterDomain domain = new VirtualClusterDomain(); domain.setName("nacos.test.1"); domainsManager.chooseDomMap().put("nacos.test.1", domain); IpAddress ipAddress = new IpAddress(); ipAddress.setIp("1.1.1.1"); List<IpAddress> ipList = new ArrayList<IpAddress>(); ipList.add(ipAddress); domainsManager.addLock("nacos.test.1"); domainsManager.easyRemvIP4Dom("nacos.test.1", ipList); }