ClusterLinkImpl implements ClusterLink { protected ClusterChannel getChannel(Priority priority) { int channelIndex = priority.ordinal() * _channelCount / MAX_CHANNEL_COUNT; if (_log.isDebugEnabled()) { _log.debug( StringBundler.concat( "Select channel number ", channelIndex, " for priority ", priority)); } return _clusterChannels.get(channelIndex); }  @Override boolean isEnabled(); @Override void sendMulticastMessage(Message message, Priority priority); @Override void sendUnicastMessage(
		Address address, Message message, Priority priority);  }
@Test public void testGetChannel() { ClusterLinkImpl clusterLinkImpl = getClusterLinkImpl(2); ClusterChannel clusterChannel1 = clusterLinkImpl.getChannel( Priority.LEVEL1); Assert.assertSame( clusterChannel1, clusterLinkImpl.getChannel(Priority.LEVEL2)); Assert.assertSame( clusterChannel1, clusterLinkImpl.getChannel(Priority.LEVEL3)); Assert.assertSame( clusterChannel1, clusterLinkImpl.getChannel(Priority.LEVEL4)); Assert.assertSame( clusterChannel1, clusterLinkImpl.getChannel(Priority.LEVEL5)); ClusterChannel clusterChannel2 = clusterLinkImpl.getChannel( Priority.LEVEL6); Assert.assertSame( clusterChannel2, clusterLinkImpl.getChannel(Priority.LEVEL7)); Assert.assertSame( clusterChannel2, clusterLinkImpl.getChannel(Priority.LEVEL8)); Assert.assertSame( clusterChannel2, clusterLinkImpl.getChannel(Priority.LEVEL9)); Assert.assertSame( clusterChannel2, clusterLinkImpl.getChannel(Priority.LEVEL10)); List<TestClusterChannel> clusterChannels = TestClusterChannel.getClusterChannels(); Assert.assertEquals( clusterChannels.toString(), 2, clusterChannels.size()); Assert.assertNotEquals(clusterChannel1, clusterChannel2); Assert.assertTrue( clusterChannels.toString(), clusterChannels.contains(clusterChannel1)); Assert.assertTrue( clusterChannels.toString(), clusterChannels.contains(clusterChannel2)); }