static void verifyCarOptions(Message car, Message part, Message tire,
            EnumGroup localGender, EnumGroup importedGender, EnumGroup condition,
            Message person, Message listRequest)
    {
        assertEquals("Car", car.getOptions().get("name"));
        assertTrue(car.getOptions().get("self") == car);
        assertTrue(car.getOptions().get("local_enum") == localGender);
        assertTrue(car.getOptions().get("nested") == part);
        assertTrue(car.getOptions().get("nested_enum") == condition);
        assertTrue(car.getOptions().get("deeper") == tire);
        assertTrue(car.getOptions().get("imported_message") == person);
        assertTrue(car.getOptions().get("imported_enum") == importedGender);
        assertTrue(car.getOptions().get("fqcn_message") == listRequest);
        assertTrue(car.getOptions().get("fqcn_enum") == importedGender);

        Field.Int32 id = (Field.Int32) car.getField("id");
        assertNotNull(id);

        assertTrue(id.getOptions().get("self") == car);
        assertTrue(id.getOptions().get("local_enum") == localGender);
        assertTrue(id.getOptions().get("nested") == part);
        assertTrue(id.getOptions().get("nested_enum") == condition);
        assertTrue(id.getOptions().get("deeper") == tire);
        assertTrue(id.getOptions().get("imported_message") == person);
        assertTrue(id.getOptions().get("imported_enum") == importedGender);
        assertTrue(id.getOptions().get("fqcn_message") == listRequest);
        assertTrue(id.getOptions().get("fqcn_enum") == importedGender);

        EnumGroup.Value male = localGender.getValue("MALE");
        assertNotNull(male);

        assertTrue(male.getOptions().get("self") == car);
        assertTrue(male.getOptions().get("local_enum") == localGender);
        assertTrue(male.getOptions().get("nested") == part);
        assertTrue(male.getOptions().get("nested_enum") == condition);
        assertTrue(male.getOptions().get("deeper") == tire);
        assertTrue(male.getOptions().get("imported_message") == person);
        assertTrue(male.getOptions().get("imported_enum") == importedGender);
        assertTrue(male.getOptions().get("fqcn_message") == listRequest);
        assertTrue(male.getOptions().get("fqcn_enum") == importedGender);

        if (ConfiguredReference.RESOLVE_ENUM_VALUE_REF)
        {
            assertTrue(car.getOptions().get("local_gender") == localGender.getValue("MALE"));
            assertTrue(car.getOptions().get("imported_gender") == importedGender.getValue("FEMALE"));
        }
    }
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