public Schema toCamelCase() {
    return this.getFields().stream()
        .map(
            field -> {
              FieldType innerType = field.getType();
              if (innerType.getRowSchema() != null) {
                Schema innerCamelCaseSchema = innerType.getRowSchema().toCamelCase();
                innerType = innerType.toBuilder().setRowSchema(innerCamelCaseSchema).build();
                field = field.toBuilder().setType(innerType).build();
              }
              return field
                  .toBuilder()
                  .setName(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, field.getName()))
                  .build();
            })
        .collect(toSchema());
  }
@Test
  public void testToCamelCase() {
    Schema innerSchema =
        Schema.builder()
            .addStringField("my_first_nested_string_field")
            .addStringField("my_second_nested_string_field")
            .build();
    Schema schema =
        Schema.builder()
            .addStringField("my_first_string_field")
            .addStringField("my_second_string_field")
            .addRowField("my_row_field", innerSchema)
            .build();

    Schema expectedInnerCamelCaseSchema =
        Schema.builder()
            .addStringField("myFirstNestedStringField")
            .addStringField("mySecondNestedStringField")
            .build();
    Schema expectedCamelCaseSchema =
        Schema.builder()
            .addStringField("myFirstStringField")
            .addStringField("mySecondStringField")
            .addRowField("myRowField", expectedInnerCamelCaseSchema)
            .build();

    assertTrue(schema.toCamelCase().hasField("myRowField"));
    assertEquals(
        expectedInnerCamelCaseSchema,
        schema.toCamelCase().getField("myRowField").getType().getRowSchema());
    assertEquals(expectedCamelCaseSchema, schema.toCamelCase());
  }