@Test
    public void testMuchExcludedEntity() throws Exception
    {
        RuntimeSchema<MuchExcludedEntity> schema = (RuntimeSchema<MuchExcludedEntity>) RuntimeSchema
                .getSchema(MuchExcludedEntity.class);

        assertTrue(schema.getFieldCount() == 1);

        assertTrue(schema.getFieldNumber("id") == 0);
        assertNull(schema.getFieldByName("id"));

        assertTrue(schema.getFieldNumber("name") == 0);
        assertNull(schema.getFieldByName("name"));

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

        assertTrue(schema.getFieldNumber("timestamp") == 0);
        assertNull(schema.getFieldByName("timestamp"));
    }
Test for runtime schemas to skip fields annotated with @Exclude and still allow backward-forward compatibility.

@author Johannes Elgh
@created Jul 30, 2014
protostuff-runtime/src/test/java/io/protostuff/runtime/ExcludeFieldTest.java