### Question:
ClientChannelClassUtil { static Class<? extends SocketChannel> getSocketChannelClass(final EventLoopGroup eventLoopGroup) { Objects.requireNonNull(eventLoopGroup); final String socketChannelClassName = SOCKET_CHANNEL_CLASSES.get(eventLoopGroup.getClass().getName()); if (socketChannelClassName == null) { throw new IllegalArgumentException("No socket channel class found for event loop group type: " + eventLoopGroup.getClass().getName()); } try { return Class.forName(socketChannelClassName).asSubclass(SocketChannel.class); } catch (final ClassNotFoundException e) { throw new IllegalArgumentException(e); } }    }### Answer:
@Test void testGetCoreSocketChannelClass() { final NioEventLoopGroup nioEventLoopGroup = new NioEventLoopGroup(1); try { assertEquals(NioSocketChannel.class, ClientChannelClassUtil.getSocketChannelClass(nioEventLoopGroup)); } finally { nioEventLoopGroup.shutdownGracefully(); } }
@Test void testGetKqueueSocketChannelClass() { final String unavailabilityMessage = KQueue.unavailabilityCause() != null ? KQueue.unavailabilityCause().getMessage() : null; assumeTrue(KQueue.isAvailable(), "KQueue not available: " + unavailabilityMessage); final KQueueEventLoopGroup kQueueEventLoopGroup = new KQueueEventLoopGroup(1); try { assertEquals(KQueueSocketChannel.class, ClientChannelClassUtil.getSocketChannelClass(kQueueEventLoopGroup)); } finally { kQueueEventLoopGroup.shutdownGracefully(); } }
@Test void testGetEpollSocketChannelClass() { final String unavailabilityMessage = Epoll.unavailabilityCause() != null ? Epoll.unavailabilityCause().getMessage() : null; assumeTrue(Epoll.isAvailable(), "Epoll not available: " + unavailabilityMessage); final EpollEventLoopGroup epollEventLoopGroup = new EpollEventLoopGroup(1); try { assertEquals(EpollSocketChannel.class, ClientChannelClassUtil.getSocketChannelClass(epollEventLoopGroup)); } finally { epollEventLoopGroup.shutdownGracefully(); } }