### Question:
CorbaServerConduit implements Conduit { public void prepare(Message message) throws IOException { message.put(CorbaConstants.ORB, orb); message.put(CorbaConstants.CORBA_ENDPOINT_OBJECT, targetObject); message.setContent(OutputStream.class, new CorbaOutputStream()); if (message instanceof CorbaMessage) { ((CorbaMessage) message).setCorbaTypeMap(typeMap); } } CorbaServerConduit(EndpointInfo ei,
                              EndpointReferenceType ref,
                              org.omg.CORBA.Object targetObj,
                              ORB o,
                              OrbConfig config,
                              CorbaTypeMap map); void prepare(Message message); void close(Message message); EndpointReferenceType getTarget(); void close(); void setMessageObserver(MessageObserver observer); MessageObserver getMessageObserver(); final EndpointReferenceType getTargetReference(EndpointReferenceType t); final String getAddress(); void buildRequestResult(CorbaMessage msg);  }### Answer:
@Test public void testPrepare() throws Exception { setupServiceInfo("http: "/wsdl_corbabinding/simpleIdl.wsdl", "SimpleCORBAService", "SimpleCORBAPort"); CorbaDestination destination = new CorbaDestination(endpointInfo, orbConfig); CorbaServerConduit conduit = new CorbaServerConduit(endpointInfo, destination.getAddress(), targetObject, null, orbConfig, corbaTypeMap); CorbaMessage message = new CorbaMessage(new MessageImpl()); try { conduit.prepare(message); } catch (Exception ex) { ex.printStackTrace(); } OutputStream os = message.getContent(OutputStream.class); assertNotNull("OutputStream should not be null", os); ORB orb2 = (ORB)message.get("orb"); assertNotNull("Orb should not be null", orb2); Object obj = message.get("endpoint"); assertNotNull("EndpointReferenceType should not be null", obj); assertTrue("passed in targetObject is used", targetObject.equals(message.get(CorbaConstants.CORBA_ENDPOINT_OBJECT))); destination.shutdown(); }