### Question:
ContextUtils { public static boolean isOutbound(Message message) { Exchange exchange = message.getExchange(); return exchange != null && message == exchange.getOutMessage(); } private  ContextUtils(); static boolean isRequestor(Message message); static boolean isOutbound(Message message); static DataWriter<XMLEventWriter> getDataWriter(CorbaMessage message); static DataReader<XMLEventReader> getDataReader(CorbaMessage message);  }### Answer:
@Test public void testIsOutbound() throws Exception { Message message = new MessageImpl(); Exchange exchange = new ExchangeImpl(); exchange.setOutMessage(message); message.setExchange(exchange); assertTrue(ContextUtils.isOutbound(message)); }
@Test public void testIsOutbound() throws Exception { Message message = new MessageImpl(); Exchange exchange = new ExchangeImpl(); exchange.setOutMessage(message); message.setExchange(exchange); assertEquals(ContextUtils.isOutbound(message), true); }