public void testIt() throws Exception
    {
        File f = ProtoParserTest.getFile("io/protostuff/parser/test_option_annotation_reference.proto");
        assertTrue(f.exists());

        Proto proto = new Proto(f);
        ProtoUtil.loadFrom(f, proto);

        Message car = proto.getMessage("Car");
        assertNotNull(car);

        EnumGroup condition = car.getNestedEnumGroup("Condition");
        assertNotNull(condition);

        Message part = car.getNestedMessage("Part");
        assertNotNull(part);

        Message tire = part.getNestedMessage("Tire");
        assertNotNull(tire);

        Message person = (Message) proto.findReference("Person", proto.getPackageName());
        assertNotNull(person);

        Message listRequest = person.getNestedMessage("ListRequest");
        assertNotNull(listRequest);

        EnumGroup importedGender = (EnumGroup) proto.findReference("Person.Gender", proto.getPackageName());
        assertNotNull(importedGender);

        EnumGroup localGender = proto.getEnumGroup("Gender");
        assertNotNull(localGender);

        verifyCarAnnotations(car, part, tire, localGender, importedGender, condition,
                person, listRequest);

        verifyCarOptions(car, part, tire, localGender, importedGender, condition,
                person, listRequest);

        verifyPart(part);
        verifyCondition(condition);

        Service carService = proto.getService("CarService");
        assertNotNull(carService);

        verifyCarService(carService, car, condition);
    }
Test for references configured via options and annotations.

@author David Yu
@created Dec 22, 2011
protostuff-parser/src/test/java/io/protostuff/parser/ConfiguredReferenceTest.java