@Test
    public void testComplexFieldsPojo()
    {
        Schema<ComplexFieldsPojo> schema = RuntimeSchema
                .getSchema(ComplexFieldsPojo.class);

        RuntimeSchema<ComplexFieldsPojo> mappedSchema = (RuntimeSchema<ComplexFieldsPojo>) schema;

        assertTrue(mappedSchema.getFieldCount() == 45);

        Class<?> expectedCollectionClass = RuntimeEnv.COLLECTION_SCHEMA_ON_REPEATED_FIELDS ? RuntimeCollectionField.class
                : RuntimeObjectField.class;

        assertAssignable(
                mappedSchema.getFieldByName("someCollectionValueArray"),
                expectedCollectionClass);
        assertAssignable(
                mappedSchema.getFieldByName("someCollectionValueCollection"),
                expectedCollectionClass);
        assertAssignable(
                mappedSchema.getFieldByName("someCollectionValueList"),
                expectedCollectionClass);
        assertAssignable(
                mappedSchema.getFieldByName("someCollectionValueSet"),
                expectedCollectionClass);
        assertAssignable(
                mappedSchema.getFieldByName("someCollectionValueMap"),
                expectedCollectionClass);
        assertAssignable(
                mappedSchema.getFieldByName("someCollectionValueObject"),
                expectedCollectionClass);
        assertAssignable(
                mappedSchema.getFieldByName("someCollectionValueWildcard"),
                expectedCollectionClass);

        assertAssignable(mappedSchema.getFieldByName("someListValueArray"),
                expectedCollectionClass);
        assertAssignable(
                mappedSchema.getFieldByName("someListValueCollection"),
                expectedCollectionClass);
        assertAssignable(mappedSchema.getFieldByName("someListValueList"),
                expectedCollectionClass);
        assertAssignable(mappedSchema.getFieldByName("someListValueSet"),
                expectedCollectionClass);
        assertAssignable(mappedSchema.getFieldByName("someListValueMap"),
                expectedCollectionClass);
        assertAssignable(mappedSchema.getFieldByName("someListValueObject"),
                expectedCollectionClass);
        assertAssignable(
                mappedSchema.getFieldByName("someListValueWildcard"),
                expectedCollectionClass);

        assertAssignable(mappedSchema.getFieldByName("someSetValueArray"),
                expectedCollectionClass);
        assertAssignable(
                mappedSchema.getFieldByName("someSetValueCollection"),
                expectedCollectionClass);
        assertAssignable(mappedSchema.getFieldByName("someSetValueList"),
                expectedCollectionClass);
        assertAssignable(mappedSchema.getFieldByName("someSetValueSet"),
                expectedCollectionClass);
        assertAssignable(mappedSchema.getFieldByName("someSetValueMap"),
                expectedCollectionClass);
        assertAssignable(mappedSchema.getFieldByName("someSetValueObject"),
                expectedCollectionClass);
        assertAssignable(mappedSchema.getFieldByName("someSetValueWildcard"),
                expectedCollectionClass);

        assertTrue(mappedSchema.getFieldByName("someMapKeyArray") instanceof RuntimeMapField<?, ?, ?>);
        assertTrue(mappedSchema.getFieldByName("someMapValueArray") instanceof RuntimeMapField<?, ?, ?>);
        assertTrue(mappedSchema.getFieldByName("someMapBothArray") instanceof RuntimeMapField<?, ?, ?>);
        assertTrue(mappedSchema.getFieldByName("someMapBothObject") instanceof RuntimeMapField<?, ?, ?>);
        assertTrue(mappedSchema.getFieldByName("someMapBothWildcard") instanceof RuntimeMapField<?, ?, ?>);

        assertTrue(mappedSchema.getFieldByName("someMapKeyCollection") instanceof RuntimeMapField<?, ?, ?>);
        assertTrue(mappedSchema.getFieldByName("someMapValueCollection") instanceof RuntimeMapField<?, ?, ?>);
        assertTrue(mappedSchema.getFieldByName("someMapBothCollection") instanceof RuntimeMapField<?, ?, ?>);

        assertTrue(mappedSchema.getFieldByName("someMapKeyList") instanceof RuntimeMapField<?, ?, ?>);
        assertTrue(mappedSchema.getFieldByName("someMapValueList") instanceof RuntimeMapField<?, ?, ?>);
        assertTrue(mappedSchema.getFieldByName("someMapBothList") instanceof RuntimeMapField<?, ?, ?>);

        assertTrue(mappedSchema.getFieldByName("someMapKeySet") instanceof RuntimeMapField<?, ?, ?>);
        assertTrue(mappedSchema.getFieldByName("someMapValueSet") instanceof RuntimeMapField<?, ?, ?>);
        assertTrue(mappedSchema.getFieldByName("someMapBothSet") instanceof RuntimeMapField<?, ?, ?>);

        assertTrue(mappedSchema.getFieldByName("someMapKeyMap") instanceof RuntimeMapField<?, ?, ?>);
        assertTrue(mappedSchema.getFieldByName("someMapValueMap") instanceof RuntimeMapField<?, ?, ?>);
        assertTrue(mappedSchema.getFieldByName("someMapBothMap") instanceof RuntimeMapField<?, ?, ?>);

        assertTrue(mappedSchema.getFieldByName("someIntArray4D") instanceof RuntimeObjectField<?>);
        assertTrue(mappedSchema.getFieldByName("someLongArray3D") instanceof RuntimeObjectField<?>);
        assertTrue(mappedSchema.getFieldByName("someByteArray2D") instanceof RuntimeObjectField<?>);

    }
Test w/c fields should be excluded.

@author David Yu
protostuff-runtime/src/test/java/io/protostuff/runtime/FieldExclusionTest.java