}
@Test
public void testSetConnectionUnbindsFromPreviousConnection() {
ChannelManager manager = new ChannelManager(factory);
InternalConnection connection = mock(InternalConnection.class);
manager.setConnection(connection);
InternalConnection secondConnection = mock(InternalConnection.class);
manager.setConnection(secondConnection);
verify(connection).unbind(ConnectionState.CONNECTED, manager);
}