### Question:
CorbaConduit implements Conduit { public Request getRequest(CorbaMessage message, String opName, org.omg.CORBA.NVList nvlist, org.omg.CORBA.NamedValue ret, org.omg.CORBA.ExceptionList exList) throws Exception { Request request = null; if (orb == null) { prepareOrb(); } ContextList ctxList = orb.create_context_list(); Context ctx = null; try { ctx = orb.get_default_context(); } catch (Exception ex) { } org.omg.CORBA.Object targetObj = (org.omg.CORBA.Object)message.get(CorbaConstants.CORBA_ENDPOINT_OBJECT); if (targetObj != null) { request = targetObj._create_request(ctx, opName, nvlist, ret, exList, ctxList); } return request; } CorbaConduit(EndpointInfo ei, EndpointReferenceType ref, OrbConfig config); OrbConfig getOrbConfig(); synchronized void prepareOrb(); void prepare(Message message); void close(Message message); EndpointReferenceType getTarget(); void close(); void setMessageObserver(MessageObserver observer); final EndpointReferenceType getTargetReference(EndpointReferenceType t); final String getAddress(); void buildRequest(CorbaMessage message, OperationType opType); NVList getArguments(CorbaMessage message); NamedValue getReturn(CorbaMessage message); ExceptionList getExceptionList(Map<TypeCode, RaisesType> exceptions,
                                             CorbaMessage message,
                                             OperationType opType); Request getRequest(CorbaMessage message,
                                 String opName,
                                 org.omg.CORBA.NVList nvlist,
                                 org.omg.CORBA.NamedValue ret,
                                 org.omg.CORBA.ExceptionList exList); Map<TypeCode, RaisesType> getOperationExceptions(
                                         OperationType operation,
                                         CorbaTypeMap map); MessageObserver getMessageObserver();  }### Answer:
@Test public void testInvoke() throws Exception { CorbaConduit conduit = setupCorbaConduit(false); CorbaMessage message = control.createMock(CorbaMessage.class); org.omg.CORBA.Object obj = control.createMock(org.omg.CORBA.Object.class); EasyMock.expect(message.get(CorbaConstants.CORBA_ENDPOINT_OBJECT)).andReturn(obj); Request r = control.createMock(Request.class); NVList nvList = orb.create_list(0); NamedValue ret = control.createMock(NamedValue.class); ExceptionList exList = control.createMock(ExceptionList.class); EasyMock.expect(obj._create_request((Context)EasyMock.anyObject(), EasyMock.eq("greetMe"), EasyMock.isA(NVList.class), EasyMock.isA(NamedValue.class), EasyMock.isA(ExceptionList.class), EasyMock.isA(ContextList.class))); EasyMock.expectLastCall().andReturn(r); r.invoke(); EasyMock.expectLastCall(); control.replay(); Request request = conduit.getRequest(message, "greetMe", nvList, ret, exList); request.invoke(); control.verify(); }