@Test
public void testInitChannels() {

	try (CaptureHandler captureHandler =
			JDKLoggerTestUtil.configureJDKLogger(
				ClusterLinkImpl.class.getName(), Level.OFF)) {
		// Test 1, create ClusterLinkImpl#MAX_CHANNEL_COUNT channels
		List<LogRecord> logRecords = captureHandler.getLogRecords();
		try {
			getClusterLinkImpl(ClusterLinkImpl.MAX_CHANNEL_COUNT + 1);
			Assert.fail();
		}
		catch (IllegalStateException illegalStateException) {
			Assert.assertEquals(
				logRecords.toString(), 0, logRecords.size());
			Assert.assertEquals(
				"java.lang.IllegalArgumentException: Channel count must " +
					"be between 1 and " + ClusterLinkImpl.MAX_CHANNEL_COUNT,
				illegalStateException.getMessage());
		}
		// Test 2, create 0 channels
		logRecords = captureHandler.resetLogLevel(Level.SEVERE);
		try {
			getClusterLinkImpl(0);
			Assert.fail();
		}
		catch (IllegalStateException illegalStateException) {
			Assert.assertEquals(
				logRecords.toString(), 1, logRecords.size());
			LogRecord logRecord = logRecords.get(0);
			Assert.assertEquals(
				"Unable to initialize channels", logRecord.getMessage());
			Assert.assertEquals(
				"java.lang.IllegalArgumentException: Channel count must " +
					"be between 1 and " + ClusterLinkImpl.MAX_CHANNEL_COUNT,
				illegalStateException.getMessage());
		}
	}
}