    @Test
    public void getGenericsTypesByClass() {

        Class<? extends Serializer> clazz = SerializerImpl.class;
        Type[] types = TypeUtils.getGenericsTypesByClass(clazz, Serializer.class);
        assertThat(types.length).isEqualTo(2);
        assertThat(types[0].getTypeName()).isEqualTo("java.lang.String");
        assertThat(types[1].getTypeName()).isEqualTo("java.lang.Integer");
    }