assertTrue(subtype.getWrappedType() instanceof graphql.schema.GraphQLNonNull);
graphql.schema.GraphQLNonNull wrappedType = (graphql.schema.GraphQLNonNull) subtype.getWrappedType();
assertEquals(wrappedType.getWrappedType(), GraphQLString);
}
@SuppressWarnings("unused")
<BUG>public Optional<List<@GraphQLNonNull String>> optionalMethod() { return Optional.empty();};
@Test</BUG>
public void optional() throws NoSuchMethodException {
DefaultTypeFunction instance = new DefaultTypeFunction();
<BUG>graphql.schema.GraphQLType type = instance.apply(getClass().getMethod("optionalMethod").getReturnType(), (AnnotatedParameterizedType) getClass().getMethod("listMethod").getAnnotatedReturnType());
assertTrue(type instanceof GraphQLList);</BUG>
GraphQLType subtype = ((GraphQLList) type).getWrappedType();

assertTrue(subtype.getWrappedType() instanceof graphql.schema.GraphQLNonNull);
graphql.schema.GraphQLNonNull wrappedType = (graphql.schema.GraphQLNonNull) subtype.getWrappedType();
assertEquals(wrappedType.getWrappedType(), GraphQLString);
}
@SuppressWarnings("unused")
public Optional<List<@GraphQLNonNull String>> optionalMethod() { return Optional.empty();}
@Test
public void optional() throws NoSuchMethodException {
DefaultTypeFunction instance = new DefaultTypeFunction();
graphql.schema.GraphQLType type = instance.apply(getClass().getMethod("optionalMethod").getReturnType(), getClass().getMethod("listMethod").getAnnotatedReturnType());
assertTrue(type instanceof GraphQLList);
GraphQLType subtype = ((GraphQLList) type).getWrappedType();
