### Question:
ContractChannelCoupler implements ContractChannel { public void setContract(Map<String, Object> serviceMap, ContractCache cache) { this.serviceMap = serviceMap; this.cache = cache; }  void setContract(Map<String, Object> serviceMap, ContractCache cache); @Override JsonObject call(String contractVersion, ContractMethodType type, String methodName, JsonObject params);  }### Answer:
@Test public void callMethodTest() { ContractChannelCoupler coupler = new ContractChannelCoupler(); coupler.setContract(contractMap, cache); contractMap.values().stream().forEach(c -> { TestContract s = (TestContract)c; s.channel = coupler; }); TestContract t = (TestContract) contractMap.get("TEST2"); t.callContractChannelInvoke("TEST1", "callMethod"); t.callContractChannelQuery("TEST1","yesmanQuery"); }
@Test public void callChnnelMethodTest() { ContractChannelCoupler coupler = new ContractChannelCoupler(); coupler.setContract(contractMap, cache); contractMap.values().stream().forEach(c -> { TestContract s = (TestContract)c; s.channel = coupler; }); TestContract t = (TestContract) contractMap.get("TEST2"); t.callContractChnnelMethod("TEST1", "transferChannel"); }