@Test
public void findGenericTypesShouldCollectGenericTypesRecursively() throws Exception {

    // setup
    final TypeElement element = elements.getTypeElement(CustomConverter.class.getCanonicalName());
    // exercise
    final List<TypeName> actual = TypeElements.findGenericTypes(element, Converter.class.getSimpleName());
    // verify
    assertThat(actual).hasSize(2);
    assertThat(actual.get(0)).isInstanceOf(ArrayTypeName.class);
    assertThat(actual.get(0).toString()).isEqualTo("java.lang.String[]");
    assertThat(actual.get(1)).isInstanceOf(ClassName.class);
    assertThat(actual.get(1).toString()).isEqualTo("java.lang.String");
}