@Test
    public void testIt() throws Exception
    {
        RuntimeSchema<Entity> schema = (RuntimeSchema<Entity>) RuntimeSchema
                .getSchema(Entity.class);
        assertTrue(schema.getFields().size() == 3);
        assertEquals(schema.getFields().get(0).name, "id");
        assertEquals(schema.getFields().get(0).number, 1);

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

        assertEquals(schema.getFields().get(2).name, "timestamp");
        assertEquals(schema.getFields().get(2).number, 4);

        assertTrue(schema.getFieldNumber("alias") == 0);
        assertNull(schema.getFieldByName("alias"));
    }
Test for runtime schemas to skip deprecated field and still allow backward-forward compatibility.

@author David Yu
@created Oct 28, 2010
protostuff-runtime/src/test/java/io/protostuff/runtime/DeprecatedFieldTest.java