// Path: processor/testuut/noserializers/src/main/java/com/instagram/common/json/annotation/processor/NoSerializerGlobalUUT.java
// @JsonType
// public class NoSerializerGlobalUUT {
// 
//   @JsonField(fieldName = "value")
//   String mValue;
// }
// 
// Path: processor/testuut/src/main/java/com/instagram/common/json/annotation/processor/NoSerializerClassUUT.java
// @JsonType(generateSerializer = JsonType.TriState.NO)
// public class NoSerializerClassUUT {
// 
//   enum DummyEnum {
//     A,
//     B;
//   }
// 
//   @JsonField(fieldName = "value")
//   String mValue;
// 
//   /**
//    * Ensure that we don't have to provide a serializeCodeFormatter for enums if serialization is
//    * disabled.
//    */
//   @JsonField(
//       fieldName = "dummyEnum",
//       valueExtractFormatter = "NoSerializerClassUUT.DummyEnum.valueOf(${parser_object}.getText())")
//   DummyEnum dummyEnum;
// }
// 
// Path: processor/testuut/src/main/java/com/instagram/common/json/annotation/processor/SimpleParseUUT.java
// @JsonType
// public class SimpleParseUUT {
//   public static final String INT_FIELD_NAME = "int";
//   public static final String INTEGER_FIELD_NAME = "Integer";
//   public static final String FLOAT_FIELD_NAME = "float";
//   public static final String FLOAT_OBJ_FIELD_NAME = "Float";
//   public static final String STRING_FIELD_NAME = "String";
//   public static final String INTEGER_LIST_FIELD_NAME = "IntegerList";
//   public static final String INTEGER_ARRAY_LIST_FIELD_NAME = "IntegerArrayList";
//   public static final String INTEGER_QUEUE_FIELD_NAME = "IntegerQueue";
//   public static final String INTEGER_SET_FIELD_NAME = "IntegerSet";
//   public static final String SUBOBJECT_FIELD_NAME = "Subobject";
//   public static final String SUBENUM_FIELD_NAME = "Subenum";
//   public static final String SUBENUM_LIST_FIELD_NAME = "SubenumList";
// 
//   @JsonField(fieldName = INT_FIELD_NAME)
//   public int intField;
// 
//   @JsonField(fieldName = INTEGER_FIELD_NAME)
//   public Integer integerField;
// 
//   @JsonField(fieldName = FLOAT_FIELD_NAME)
//   public float floatField;
// 
//   @JsonField(fieldName = FLOAT_OBJ_FIELD_NAME)
//   public Float FloatField;
// 
//   @JsonField(fieldName = STRING_FIELD_NAME, mapping = JsonField.TypeMapping.EXACT)
//   public String stringField;
// 
//   @JsonField(fieldName = INTEGER_LIST_FIELD_NAME)
//   public List<Integer> integerListField;
// 
//   @JsonField(fieldName = INTEGER_ARRAY_LIST_FIELD_NAME)
//   public ArrayList<Integer> integerArrayListField;
// 
//   @JsonField(fieldName = INTEGER_QUEUE_FIELD_NAME)
//   public Queue<Integer> integerQueueField;
// 
//   @JsonField(fieldName = INTEGER_SET_FIELD_NAME)
//   public Set<Integer> integerSetField;
// 
//   @JsonField(fieldName = SUBOBJECT_FIELD_NAME)
//   public SubobjectParseUUT subobjectField;
// 
//   @JsonField(
//       fieldName = SUBENUM_FIELD_NAME,
//       valueExtractFormatter = "SimpleParseUUT.SubenumUUT.valueOf(${parser_object}.getText())",
//       serializeCodeFormatter =
//           "${generator_object}.writeStringField(\"${json_fieldname}\", "
//               + "${object_varname}.${field_varname}.toString())")
//   public SubenumUUT subenumField;
// 
//   @JsonField(
//       fieldName = SUBENUM_LIST_FIELD_NAME,
//       valueExtractFormatter = "SimpleParseUUT.SubenumUUT.valueOf(${parser_object}.getText())",
//       serializeCodeFormatter = "${generator_object}.writeString(element.toString())",
//       fieldAssignmentFormatter =
//           "${object_varname}.${field_varname} = "
//               + "new ArrayList<SimpleParseUUT.SubenumUUT>(${extracted_value})")
//   public List<SubenumUUT> subenumFieldList;
// 
//   /** UUT for embedding a subobject. */
//   @JsonType
//   public static class SubobjectParseUUT {
//     public static final String INT_FIELD_NAME = "int";
// 
//     @JsonField(fieldName = INT_FIELD_NAME)
//     public int intField;
//   }
// 
//   /** UUT for embedding a subenum. */
//   public enum SubenumUUT {
//     A,
//     B
//   }
// }


import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertNull;
import com.fasterxml.jackson.core.JsonGenerator;
import com.instagram.common.json.annotation.processor.noserializers.NoSerializerGlobalUUT;
import com.instagram.common.json.annotation.processor.noserializers.NoSerializerGlobalUUT__JsonHelper;
import com.instagram.common.json.annotation.processor.uut.NoSerializerClassUUT;
import com.instagram.common.json.annotation.processor.uut.NoSerializerClassUUT__JsonHelper;
import com.instagram.common.json.annotation.processor.uut.SimpleParseUUT;
import com.instagram.common.json.annotation.processor.uut.SimpleParseUUT__JsonHelper;
import java.lang.reflect.Method;
import org.junit.Test;
    assertNotNull(serializeMethod);

    serializeMethod =
        SimpleParseUUT__JsonHelper.class.getMethod(
            "serializeToJson", JsonGenerator.class, SimpleParseUUT.class, boolean.class);
    assertNotNull(serializeMethod);

    try {
      serializeMethod = null;
      serializeMethod =
          NoSerializerGlobalUUT__JsonHelper.class.getMethod(
              "serializeToJson", NoSerializerGlobalUUT.class);
    } catch (NoSuchMethodException ignored) {
    }
    assertNull(serializeMethod);

    try {
      serializeMethod = null;
      serializeMethod =
          NoSerializerGlobalUUT__JsonHelper.class.getMethod(
              "serializeToJson", JsonGenerator.class, NoSerializerGlobalUUT.class, boolean.class);
    } catch (NoSuchMethodException ignored) {
    }
    assertNull(serializeMethod);
  }

  @Test
  public void testMissingSerializersClasSwitch() throws Exception {

    Method serializeMethod =
// Path: processor/testuut/noserializers/src/main/java/com/instagram/common/json/annotation/processor/NoSerializerGlobalUUT.java
// @JsonType
// public class NoSerializerGlobalUUT {
// 
//   @JsonField(fieldName = "value")
//   String mValue;
// }
// 
// Path: processor/testuut/src/main/java/com/instagram/common/json/annotation/processor/NoSerializerClassUUT.java
// @JsonType(generateSerializer = JsonType.TriState.NO)
// public class NoSerializerClassUUT {
// 
//   enum DummyEnum {
//     A,
//     B;
//   }
// 
//   @JsonField(fieldName = "value")
//   String mValue;
// 
//   /**
//    * Ensure that we don't have to provide a serializeCodeFormatter for enums if serialization is
//    * disabled.
//    */
//   @JsonField(
//       fieldName = "dummyEnum",
//       valueExtractFormatter = "NoSerializerClassUUT.DummyEnum.valueOf(${parser_object}.getText())")
//   DummyEnum dummyEnum;
// }
// 
// Path: processor/testuut/src/main/java/com/instagram/common/json/annotation/processor/SimpleParseUUT.java
// @JsonType
// public class SimpleParseUUT {
//   public static final String INT_FIELD_NAME = "int";
//   public static final String INTEGER_FIELD_NAME = "Integer";
//   public static final String FLOAT_FIELD_NAME = "float";
//   public static final String FLOAT_OBJ_FIELD_NAME = "Float";
//   public static final String STRING_FIELD_NAME = "String";
//   public static final String INTEGER_LIST_FIELD_NAME = "IntegerList";
//   public static final String INTEGER_ARRAY_LIST_FIELD_NAME = "IntegerArrayList";
//   public static final String INTEGER_QUEUE_FIELD_NAME = "IntegerQueue";
//   public static final String INTEGER_SET_FIELD_NAME = "IntegerSet";
//   public static final String SUBOBJECT_FIELD_NAME = "Subobject";
//   public static final String SUBENUM_FIELD_NAME = "Subenum";
//   public static final String SUBENUM_LIST_FIELD_NAME = "SubenumList";
// 
//   @JsonField(fieldName = INT_FIELD_NAME)
//   public int intField;
// 
//   @JsonField(fieldName = INTEGER_FIELD_NAME)
//   public Integer integerField;
// 
//   @JsonField(fieldName = FLOAT_FIELD_NAME)
//   public float floatField;
// 
//   @JsonField(fieldName = FLOAT_OBJ_FIELD_NAME)
//   public Float FloatField;
// 
//   @JsonField(fieldName = STRING_FIELD_NAME, mapping = JsonField.TypeMapping.EXACT)
//   public String stringField;
// 
//   @JsonField(fieldName = INTEGER_LIST_FIELD_NAME)
//   public List<Integer> integerListField;
// 
//   @JsonField(fieldName = INTEGER_ARRAY_LIST_FIELD_NAME)
//   public ArrayList<Integer> integerArrayListField;
// 
//   @JsonField(fieldName = INTEGER_QUEUE_FIELD_NAME)
//   public Queue<Integer> integerQueueField;
// 
//   @JsonField(fieldName = INTEGER_SET_FIELD_NAME)
//   public Set<Integer> integerSetField;
// 
//   @JsonField(fieldName = SUBOBJECT_FIELD_NAME)
//   public SubobjectParseUUT subobjectField;
// 
//   @JsonField(
//       fieldName = SUBENUM_FIELD_NAME,
//       valueExtractFormatter = "SimpleParseUUT.SubenumUUT.valueOf(${parser_object}.getText())",
//       serializeCodeFormatter =
//           "${generator_object}.writeStringField(\"${json_fieldname}\", "
//               + "${object_varname}.${field_varname}.toString())")
//   public SubenumUUT subenumField;
// 
//   @JsonField(
//       fieldName = SUBENUM_LIST_FIELD_NAME,
//       valueExtractFormatter = "SimpleParseUUT.SubenumUUT.valueOf(${parser_object}.getText())",
//       serializeCodeFormatter = "${generator_object}.writeString(element.toString())",
//       fieldAssignmentFormatter =
//           "${object_varname}.${field_varname} = "
//               + "new ArrayList<SimpleParseUUT.SubenumUUT>(${extracted_value})")
//   public List<SubenumUUT> subenumFieldList;
// 
//   /** UUT for embedding a subobject. */
//   @JsonType
//   public static class SubobjectParseUUT {
//     public static final String INT_FIELD_NAME = "int";
// 
//     @JsonField(fieldName = INT_FIELD_NAME)
//     public int intField;
//   }
// 
//   /** UUT for embedding a subenum. */
//   public enum SubenumUUT {
//     A,
//     B
//   }
// }


// Path: processor/src/test/java/com/instagram/common/json/annotation/processor/SelectiveGenerationTest.java
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertNull;
import com.fasterxml.jackson.core.JsonGenerator;
import com.instagram.common.json.annotation.processor.noserializers.NoSerializerGlobalUUT;
import com.instagram.common.json.annotation.processor.noserializers.NoSerializerGlobalUUT__JsonHelper;
import com.instagram.common.json.annotation.processor.uut.NoSerializerClassUUT;
import com.instagram.common.json.annotation.processor.uut.NoSerializerClassUUT__JsonHelper;
import com.instagram.common.json.annotation.processor.uut.SimpleParseUUT;
import com.instagram.common.json.annotation.processor.uut.SimpleParseUUT__JsonHelper;
import java.lang.reflect.Method;
import org.junit.Test;

    assertNotNull(serializeMethod);

    serializeMethod =
        SimpleParseUUT__JsonHelper.class.getMethod(
            "serializeToJson", JsonGenerator.class, SimpleParseUUT.class, boolean.class);
    assertNotNull(serializeMethod);

    try {
      serializeMethod = null;
      serializeMethod =
          NoSerializerGlobalUUT__JsonHelper.class.getMethod(
              "serializeToJson", NoSerializerGlobalUUT.class);
    } catch (NoSuchMethodException ignored) {
    }
    assertNull(serializeMethod);

    try {
      serializeMethod = null;
      serializeMethod =
          NoSerializerGlobalUUT__JsonHelper.class.getMethod(
              "serializeToJson", JsonGenerator.class, NoSerializerGlobalUUT.class, boolean.class);
    } catch (NoSuchMethodException ignored) {
    }
    assertNull(serializeMethod);
  }

  @Test
  public void testMissingSerializersClasSwitch() throws Exception {

    Method serializeMethod =
        SimpleParseUUT__JsonHelper.class.getMethod("serializeToJson", SimpleParseUUT.class);