### Question:
MySQLConnector { public synchronized void connect() { responseCallback = new DefaultPromise<>(eventLoopGroup.next()); channel = new Bootstrap() .group(eventLoopGroup) .channel(NioSocketChannel.class) .handler(new ChannelInitializer<SocketChannel>() { @Override protected void initChannel(final SocketChannel socketChannel) { socketChannel.pipeline().addLast(new LengthFieldBasedFrameDecoder(ByteOrder.LITTLE_ENDIAN, Integer.MAX_VALUE, 0, 3, 1, 4, true)); socketChannel.pipeline().addLast(MySQLLengthFieldBasedFrameEncoder.class.getSimpleName(), new MySQLLengthFieldBasedFrameEncoder()); socketChannel.pipeline().addLast(new MySQLCommandPacketDecoder()); socketChannel.pipeline().addLast(new MySQLNegotiateHandler(username, password, responseCallback)); socketChannel.pipeline().addLast(new MySQLCommandResponseHandler()); } }) .option(ChannelOption.AUTO_READ, true) .connect(host, port).channel(); serverInfo = waitExpectedResponse(ServerInfo.class); }  synchronized void connect(); synchronized boolean execute(final String queryString); synchronized int executeUpdate(final String queryString); synchronized InternalResultSet executeQuery(final String queryString); synchronized void subscribe(final String binlogFileName, final long binlogPosition); synchronized AbstractBinlogEvent poll();  }### Answer:
@Test public void assertConnect() throws NoSuchFieldException, IllegalAccessException { final ServerInfo expected = new ServerInfo(); mockChannelResponse(expected); mySQLConnector.connect(); ServerInfo actual = ReflectionUtil.getFieldValueFromClass(mySQLConnector, "serverInfo", ServerInfo.class); assertThat(actual, is(expected)); }