// Path: src/test/java/com/bretpatterson/schemagen/graphql/impl/common/JacksonTypeFactory.java
// public class JacksonTypeFactory implements ITypeFactory {
// 	ObjectMapper objectMapper;
// 
// 	public JacksonTypeFactory(ObjectMapper objectMapper) {
// 		this.objectMapper = objectMapper;
// 	}
// 
// 	@Override
// 	public Object convertToType(Type type, Object arg) {
// 		try {
// 			return objectMapper.readValue(objectMapper.writeValueAsString(arg), TypeFactory.defaultInstance().constructType(type));
// 		} catch(IOException ex) {
// 			return Throwables.propagate(ex);
// 		}
// 
// 	}
// }


import com.bretpatterson.schemagen.graphql.annotations.GraphQLController;
import com.bretpatterson.schemagen.graphql.annotations.GraphQLDescription;
import com.bretpatterson.schemagen.graphql.annotations.GraphQLMutation;
import com.bretpatterson.schemagen.graphql.annotations.GraphQLParam;
import com.bretpatterson.schemagen.graphql.annotations.GraphQLQuery;
import com.bretpatterson.schemagen.graphql.annotations.GraphQLTypeConverter;
import com.bretpatterson.schemagen.graphql.annotations.GraphQLName;
import com.bretpatterson.schemagen.graphql.datafetchers.DefaultTypeConverter;
import com.bretpatterson.schemagen.graphql.impl.common.JacksonTypeFactory;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.ImmutableList;
import graphql.ExecutionResult;
import graphql.GraphQL;
import graphql.Scalars;
import graphql.schema.DataFetcher;
import graphql.schema.GraphQLFieldDefinition;
import graphql.schema.GraphQLInputObjectType;
import graphql.schema.GraphQLObjectType;
import graphql.schema.GraphQLSchema;
import org.junit.Test;
import java.util.Map;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
		public String getName() {
			return name;
		}
	}

	@Test
	public void testController() {
		GraphQLSchema schema = GraphQLSchemaBuilder.newBuilder().registerGraphQLControllerObjects(ImmutableList.<Object> of(new TestController())).build();

		GraphQLFieldDefinition queryType = schema.getQueryType().getFieldDefinition("testType");
		assertEquals("testType", queryType.getName());
		assertEquals("TestType", queryType.getType().getName());
	}

	@Test
	public void testQueryArguments() {
		GraphQLSchema schema = GraphQLSchemaBuilder.newBuilder().registerGraphQLControllerObjects(ImmutableList.<Object> of(new TestController())).build();

		GraphQLFieldDefinition queryType = schema.getQueryType().getFieldDefinition("testQueryArguments");
		assertEquals("testQueryArguments", queryType.getName());
		assertEquals(Scalars.GraphQLString, queryType.getArgument("string").getType());
		assertEquals(Scalars.GraphQLInt, queryType.getArgument("int").getType());
		assertEquals(GraphQLInputObjectType.class, queryType.getArgument("test").getType().getClass());
		assertEquals("RenamedTestInputType_Input", queryType.getArgument("test").getType().getName());
	}

	@SuppressWarnings("unchecked")
	@Test
	public void testMutation() {
		GraphQLSchema schema = GraphQLSchemaBuilder.newBuilder()
// Path: src/test/java/com/bretpatterson/schemagen/graphql/impl/common/JacksonTypeFactory.java
// public class JacksonTypeFactory implements ITypeFactory {
// 	ObjectMapper objectMapper;
// 
// 	public JacksonTypeFactory(ObjectMapper objectMapper) {
// 		this.objectMapper = objectMapper;
// 	}
// 
// 	@Override
// 	public Object convertToType(Type type, Object arg) {
// 		try {
// 			return objectMapper.readValue(objectMapper.writeValueAsString(arg), TypeFactory.defaultInstance().constructType(type));
// 		} catch(IOException ex) {
// 			return Throwables.propagate(ex);
// 		}
// 
// 	}
// }


// Path: src/test/java/com/bretpatterson/schemagen/graphql/GraphQLSchemaBuilderTest.java
import com.bretpatterson.schemagen.graphql.annotations.GraphQLController;
import com.bretpatterson.schemagen.graphql.annotations.GraphQLDescription;
import com.bretpatterson.schemagen.graphql.annotations.GraphQLMutation;
import com.bretpatterson.schemagen.graphql.annotations.GraphQLParam;
import com.bretpatterson.schemagen.graphql.annotations.GraphQLQuery;
import com.bretpatterson.schemagen.graphql.annotations.GraphQLTypeConverter;
import com.bretpatterson.schemagen.graphql.annotations.GraphQLName;
import com.bretpatterson.schemagen.graphql.datafetchers.DefaultTypeConverter;
import com.bretpatterson.schemagen.graphql.impl.common.JacksonTypeFactory;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.ImmutableList;
import graphql.ExecutionResult;
import graphql.GraphQL;
import graphql.Scalars;
import graphql.schema.DataFetcher;
import graphql.schema.GraphQLFieldDefinition;
import graphql.schema.GraphQLInputObjectType;
import graphql.schema.GraphQLObjectType;
import graphql.schema.GraphQLSchema;
import org.junit.Test;
import java.util.Map;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

		public String getName() {
			return name;
		}
	}

	@Test
	public void testController() {
		GraphQLSchema schema = GraphQLSchemaBuilder.newBuilder().registerGraphQLControllerObjects(ImmutableList.<Object> of(new TestController())).build();

		GraphQLFieldDefinition queryType = schema.getQueryType().getFieldDefinition("testType");
		assertEquals("testType", queryType.getName());
		assertEquals("TestType", queryType.getType().getName());
	}

	@Test
	public void testQueryArguments() {
		GraphQLSchema schema = GraphQLSchemaBuilder.newBuilder().registerGraphQLControllerObjects(ImmutableList.<Object> of(new TestController())).build();

		GraphQLFieldDefinition queryType = schema.getQueryType().getFieldDefinition("testQueryArguments");
		assertEquals("testQueryArguments", queryType.getName());
		assertEquals(Scalars.GraphQLString, queryType.getArgument("string").getType());
		assertEquals(Scalars.GraphQLInt, queryType.getArgument("int").getType());
		assertEquals(GraphQLInputObjectType.class, queryType.getArgument("test").getType().getClass());
		assertEquals("RenamedTestInputType_Input", queryType.getArgument("test").getType().getName());
	}

	@SuppressWarnings("unchecked")
	@Test
	public void testMutation() {
		GraphQLSchema schema = GraphQLSchemaBuilder.newBuilder()
				.registerTypeFactory(new JacksonTypeFactory(new ObjectMapper()))