@Test
public void testChannelBadPeerDoesNotBelong() throws Exception {

    thrown.expect(InvalidArgumentException.class);
    thrown.expectMessage("Channel channel does not have peer peer2");
    final Channel channel = createRunningChannel(null);
    Collection<Peer> peers = Arrays.asList((Peer[]) new Peer[] {hfclient.newPeer("peer2", "grpc://localhost:22")});
    createRunningChannel("testChannelBadPeerDoesNotBelong", peers);
    channel.sendInstantiationProposal(hfclient.newInstantiationProposalRequest(), peers);
}