@Test
public void testSetDuplicateChannnel() throws InvalidArgumentException {

    thrown.expect(InvalidArgumentException.class);
    thrown.expectMessage("Can not add orderer " + ORDERER_NAME + " to channel channel2 because it already belongs to channel " + DEFAULT_CHANNEL_NAME + ".");
    Channel channel2 = hfclient.newChannel("channel2");
    orderer.setChannel(channel2);
    orderer.setChannel(channel2);
}