@Test
    public void testEntityFullyAnnotated()
    {
        RuntimeSchema<EntityFullyAnnotated> schema = (RuntimeSchema<EntityFullyAnnotated>) RuntimeSchema
                .getSchema(EntityFullyAnnotated.class, RuntimeEnv.ID_STRATEGY);

        assertTrue(schema.getFieldCount() == 2);
        assertEquals(schema.getFields().get(0).name, "id");
        assertEquals(schema.getFields().get(0).number, 3);

        assertEquals(schema.getFields().get(1).name, "name");
        assertEquals(schema.getFields().get(1).number, 5);

        assertTrue(schema.getFieldNumber("alias") == 0);
        assertNull(schema.getFieldByName("alias"));
    }
Test for runtime schemas to handle annotation-based field mapping.

@author Brice Jaglin
@author David Yu
@created Mar 30, 2012
protostuff-runtime/src/test/java/io/protostuff/runtime/AnnotatedFieldsTest.java