Peer implements Serializable { ListenableFuture<FabricProposalResponse.ProposalResponse> sendProposalAsync(FabricProposal.SignedProposal proposal) throws PeerException, InvalidArgumentException { checkSendProposal(proposal); logger.debug(format("peer.sendProposalAsync name: %s, url: %s", name, url)); EndorserClient localEndorserClient = endorserClent; if (null == localEndorserClient || !localEndorserClient.isChannelActive()) { endorserClent = new EndorserClient(new Endpoint(url, properties).getChannelBuilder()); localEndorserClient = endorserClent; } try { return localEndorserClient.sendProposalAsync(proposal); } catch (Throwable t) { endorserClent = null; throw t; } } Peer(String name, String grpcURL, Properties properties); String getName(); Properties getProperties(); String getUrl(); @Override boolean equals(Object otherPeer); @Override int hashCode(); @Override String toString();  }
@Test (expected = PeerException.class) public void testSendAsyncNullProposal() throws PeerException, InvalidArgumentException { peer.sendProposalAsync(null); }