### Question:
HeaderExchangeChannel implements ExchangeChannel { @Override public void send(Object message) throws RemotingException { send(message, false); } HeaderExchangeChannel(Channel channel); @Override void send(Object message); @Override void send(Object message, boolean sent); @Override ResponseFuture request(Object request); @Override ResponseFuture request(Object request, int timeout); @Override boolean isClosed(); @Override void close(); @Override void close(int timeout); @Override void startClose(); @Override InetSocketAddress getLocalAddress(); @Override InetSocketAddress getRemoteAddress(); @Override URL getUrl(); @Override boolean isConnected(); @Override ChannelHandler getChannelHandler(); @Override ExchangeHandler getExchangeHandler(); @Override Object getAttribute(String key); @Override void setAttribute(String key, Object value); @Override void removeAttribute(String key); @Override boolean hasAttribute(String key); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }### Answer:
@Test public void sendTest01() throws RemotingException { boolean sent = true; String message = "this is a test message"; header.send(message, sent); List<Object> objects = channel.getSentObjects(); Assertions.assertEquals(objects.get(0), "this is a test message"); }
@Test public void sendTest02() throws RemotingException { boolean sent = true; int message = 1; header.send(message, sent); List<Object> objects = channel.getSentObjects(); Assertions.assertEquals(objects.get(0).getClass(), Request.class); Request request = (Request) objects.get(0); Assertions.assertEquals(request.getVersion(), "2.0.2"); }
@Test public void sendTest04() throws RemotingException { String message = "this is a test message"; header.send(message); List<Object> objects = channel.getSentObjects(); Assertions.assertEquals(objects.get(0), "this is a test message"); }