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

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

        Message aMessage = proto.getMessage("AMessage");
        assertNotNull(aMessage);
        assertEquals("something",
                aMessage.getField("anotherMessage").getOption("anOption"));
        assertEquals(Boolean.TRUE, aMessage.getExtraOption("message_set_wire_format"));

        Message anotherMessage = proto.getMessage("AnotherMessage");
        assertNotNull(anotherMessage);
        assertEquals("bar", anotherMessage.getExtraOption("foo"));

        EnumGroup baz = proto.getEnumGroup("Baz");
        assertNotNull(baz);
        assertEquals(Float.valueOf(1.0f), baz.getExtraOption("random.enum.option"));

        EnumGroup.Value a = baz.getValue("A");
        assertEquals(1, a.getOptions().get("some_int"));
        assertEquals(Boolean.TRUE, a.getOptions().get("some_bool"));
        assertEquals("foo", a.getOptions().get("some_string"));
        assertEquals("none", a.getOptions().get("default"));
    }
Test proto options.

@author David Yu
@created Aug 11, 2011
protostuff-parser/src/test/java/io/protostuff/parser/OptionTest.java