// Path: src/test/java/com/hubspot/jackson/datatype/protobuf/util/ObjectMapperHelper.java
// public static ObjectMapper camelCase() {
//   return DEFAULT;
// }


import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.hubspot.jackson.datatype.protobuf.util.TestProtobuf.AllFields;
import org.junit.Test;
import static com.hubspot.jackson.datatype.protobuf.util.ObjectMapperHelper.camelCase;
import static org.assertj.core.api.Assertions.assertThat;
    assertThat(parsed.hasDouble()).isFalse();
  }

  @Test(expected = JsonMappingException.class)
  public void testBooleanEnabled() throws JsonProcessingException {
    ObjectNode node = buildNode("bool");

    objectMapper(true).treeToValue(node, AllFields.class);
  }

  @Test
  public void testBooleanDisabled() throws JsonProcessingException {
    ObjectNode node = buildNode("bool");

    AllFields parsed = objectMapper(false).treeToValue(node, AllFields.class);
    assertThat(parsed.hasBool()).isFalse();
  }

  @Test
  public void testOnlyAffectsPrimitives() throws JsonProcessingException {
    ObjectNode node = buildNode("string", "bytes", "enum", "nested");

    AllFields parsed = objectMapper(true).treeToValue(node, AllFields.class);
    assertThat(parsed.hasString()).isFalse();
    assertThat(parsed.hasBytes()).isFalse();
    assertThat(parsed.hasEnum()).isFalse();
    assertThat(parsed.hasNested()).isFalse();
  }

  private ObjectNode buildNode(String... fieldNames) {
// Path: src/test/java/com/hubspot/jackson/datatype/protobuf/util/ObjectMapperHelper.java
// public static ObjectMapper camelCase() {
//   return DEFAULT;
// }


// Path: src/test/java/com/hubspot/jackson/datatype/protobuf/FailOnNullPrimitivesTest.java
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.hubspot.jackson.datatype.protobuf.util.TestProtobuf.AllFields;
import org.junit.Test;
import static com.hubspot.jackson.datatype.protobuf.util.ObjectMapperHelper.camelCase;
import static org.assertj.core.api.Assertions.assertThat;

    assertThat(parsed.hasDouble()).isFalse();
  }

  @Test(expected = JsonMappingException.class)
  public void testBooleanEnabled() throws JsonProcessingException {
    ObjectNode node = buildNode("bool");

    objectMapper(true).treeToValue(node, AllFields.class);
  }

  @Test
  public void testBooleanDisabled() throws JsonProcessingException {
    ObjectNode node = buildNode("bool");

    AllFields parsed = objectMapper(false).treeToValue(node, AllFields.class);
    assertThat(parsed.hasBool()).isFalse();
  }

  @Test
  public void testOnlyAffectsPrimitives() throws JsonProcessingException {
    ObjectNode node = buildNode("string", "bytes", "enum", "nested");

    AllFields parsed = objectMapper(true).treeToValue(node, AllFields.class);
    assertThat(parsed.hasString()).isFalse();
    assertThat(parsed.hasBytes()).isFalse();
    assertThat(parsed.hasEnum()).isFalse();
    assertThat(parsed.hasNested()).isFalse();
  }

  private ObjectNode buildNode(String... fieldNames) {
    ObjectNode node = camelCase().createObjectNode();