### Question:
CorbaServerConduit implements Conduit { public final EndpointReferenceType getTargetReference(EndpointReferenceType t) { EndpointReferenceType ref = null; if (null == t) { ref = new EndpointReferenceType(); AttributedURIType address = new AttributedURIType(); address.setValue(getAddress()); ref.setAddress(address); } else { ref = t; } return ref; } 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 testGetTargetReference() 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); EndpointReferenceType t = null; EndpointReferenceType ref = conduit.getTargetReference(t); assertNotNull("ref should not be null", ref); destination.shutdown(); }
@Test public void testGetTargetReference() 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); EndpointReferenceType t = null; EndpointReferenceType ref = conduit.getTargetReference(t); assertTrue("ref should not be null", ref != null); destination.shutdown(); }