oStream.write_long(1);
InputStream iStream = oStream.create_input_stream();
CorbaObjectReader reader = new CorbaObjectReader(iStream);
String[] enums = {"RED", "GREEN", "BLUE" };
Enum enumType = new Enum();
Enumerator enumRed = new Enumerator();
enumRed.setValue(enums[0]);
Enumerator enumGreen = new Enumerator();
enumGreen.setValue(enums[1]);
Enumerator enumBlue = new Enumerator();
enumBlue.setValue(enums[2]);
enumType.getEnumerator().add(enumRed);
enumType.getEnumerator().add(enumGreen);
enumType.getEnumerator().add(enumBlue);
// These values don't matter to the outcome of the test but are needed during construction
QName enumName = new QName("TestEnum");
QName enumIdlType = new QName("corbatm:TestEnum");
TypeCode enumTC = orb.create_enum_tc("IDL:TestEnum:1.0", enumName.getLocalPart(), enums);