### Question:
CorbaObjectReader { public void readObjectReference(CorbaObjectReferenceHandler objRefObj) throws CorbaBindingException { org.omg.CORBA.Object objRef = stream.read_Object(); objRefObj.setReference(objRef); } CorbaObjectReader(InputStream inStream); void read(CorbaObjectHandler obj); Boolean readBoolean(); Character readChar(); Character readWChar(); Byte readOctet(); Short readShort(); Integer readUShort(); Integer readLong(); long readULong(); Long readLongLong(); BigInteger readULongLong(); Float readFloat(); Double readDouble(); String readString(); String readWString(); Any readAny(); void readEnum(CorbaObjectHandler obj); void readStruct(CorbaStructHandler structObj); void readException(CorbaExceptionHandler exceptObj); void readFixed(CorbaFixedHandler fixedHandler); void readEnumDiscriminator(CorbaUnionHandler unionHandler, CorbaEnumHandler disc); void readUnion(CorbaUnionHandler unionHandler); void readArray(CorbaArrayHandler arrayObj); void readSequence(CorbaObjectHandler obj); void readObjectReference(CorbaObjectReferenceHandler objRefObj);  }### Answer:
@Test public void testReadObjectReference() throws IOException { OutputStream oStream = orb.create_output_stream(); URL refUrl = getClass().getResource("/references/account.ref"); String oRef = IOUtils.toString(refUrl.openStream()).trim(); org.omg.CORBA.Object objRef = orb.string_to_object(oRef); assertNotNull(objRef); oStream.write_Object(objRef); InputStream iStream = oStream.create_input_stream(); CorbaObjectReader reader = new CorbaObjectReader(iStream); org.apache.cxf.binding.corba.wsdl.Object objectType = new org.apache.cxf.binding.corba.wsdl.Object(); objectType.setRepositoryID("IDL:Account:1.0"); objectType.setBinding(new QName("AccountCORBABinding")); QName objectName = new QName("TestObject"); QName objectIdlType = new QName("corbaatm:TestObject"); TypeCode objectTC = orb.create_interface_tc("IDL:Account:1.0", "TestObject"); CorbaObjectReferenceHandler obj = new CorbaObjectReferenceHandler(objectName, objectIdlType, objectTC, objectType); reader.readObjectReference(obj); assertTrue(obj.getReference()._is_equivalent(objRef)); }