public void testIt() throws Exception
    {
        Class<PojoWithCollectionAndMapGenericTypes> c = PojoWithCollectionAndMapGenericTypes.class;

        assertTrue(byte[].class == genericTypeFrom(c, "cByteArray", 0));
        assertTrue(int[].class == genericTypeFrom(c, "cIntArray", 0));
        assertTrue(String[].class == genericTypeFrom(c, "cStringArray", 0));
        assertTrue(Throwable[].class == genericTypeFrom(c, "cThrowableArray", 0));

        assertTrue(long[][].class == genericTypeFrom(c, "cLongArray2D", 0));
        assertTrue(long[][][].class == genericTypeFrom(c, "cLongArray3D", 0));

        assertTrue(Class.class == genericTypeFrom(c, "cClass", 0));
        assertTrue(Enum.class == genericTypeFrom(c, "cEnum", 0));

        assertTrue(PojoWithCollectionAndMapGenericTypes.class == genericTypeFrom(
                c, "cPojo", 0));

        assertTrue(Class[].class == genericTypeFrom(c, "cClassArray", 0));

        assertTrue(Class.class == genericTypeFrom(c, "mClass", 0));
        assertTrue(Class.class == genericTypeFrom(c, "mClass", 1));

        assertTrue(Enum.class == genericTypeFrom(c, "mEnum", 0));
        assertTrue(Enum.class == genericTypeFrom(c, "mEnum", 1));
    }
Test generic types.

@author David Yu
@created May 3, 2012
protostuff-runtime/src/test/java/io/protostuff/runtime/GenericTypeTest.java