POA testPOA = rootPOA.create_POA("MyPOA", rootPOA.the_POAManager(), new Policy[] {rootPOA.create_id_assignment_policy(IdAssignmentPolicyValue.USER_ID)});
byte[] key = new byte[] {1, 2, 3, 4};
org.omg.CORBA.Object object = testPOA.create_reference_with_id(key, BasicServerHelper.id());
ObjectImpl objectImpl = (ObjectImpl) object;
Delegate delegate = (Delegate) objectImpl._get_delegate();
ParsedIOR parsedIOR = delegate.getParsedIOR();
StringWriter out = new StringWriter();
final PrintWriter printWriter = new PrintWriter(out);
PrintIOR.printIOR(orb, parsedIOR, printWriter);
printWriter.close();