test_class.declarator: function
test_class.original_string: FieldNameToArrayNotationWithValueFunction<Task> function;
test_class.type: FieldNameToArrayNotationWithValueFunction<Task>
test_class.var_name: function
test_class.file: janbanery-core/src/test/java/pl/project13/janbanery/encoders/utils/FieldNameToArrayNotationWithValueFunctionTest.java
test_class.identifier: FieldNameToArrayNotationWithValueFunctionTest
test_case.body: @Test
    public void testCamelCaseToUnderscore() throws Exception {
      // given
      String fieldName = "accountId";
  
      // when
      String underscoredName = function.camelCaseToUnderscore(fieldName);
  
      // then
      assertThat(underscoredName).isEqualTo("account_id");
    }
test_case.class_method_signature: FieldNameToArrayNotationWithValueFunctionTest.testCamelCaseToUnderscore()
test_case.full_signature: @Test public void testCamelCaseToUnderscore()
test_case.identifier: testCamelCaseToUnderscore
test_case.invocations: camelCaseToUnderscore isEqualTo assertThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCamelCaseToUnderscore()
focal_class.declarator: fieldRepresentation = "%s[%s]=%s"
focal_class.modifier: private final
focal_class.original_string: private final String fieldRepresentation = "%s[%s]=%s";
focal_class.type: String
focal_class.var_name: fieldRepresentation
focal_class.declarator: entity
focal_class.modifier: private final
focal_class.original_string: private final T entity;
focal_class.type: T
focal_class.var_name: entity
focal_class.declarator: reflectionHelper = new ReflectionHelper()
focal_class.modifier: private final
focal_class.original_string: private final ReflectionHelper reflectionHelper = new ReflectionHelper();
focal_class.type: ReflectionHelper
focal_class.var_name: reflectionHelper
focal_class.file: janbanery-core/src/main/java/pl/project13/janbanery/encoders/utils/FieldNameToArrayNotationWithValueFunction.java
focal_class.identifier: FieldNameToArrayNotationWithValueFunction
focal_class.interfaces: implements Function<Field, String>
focal_class.class_method_signature: FieldNameToArrayNotationWithValueFunction.FieldNameToArrayNotationWithValueFunction(T entity)
focal_class.full_signature: public  FieldNameToArrayNotationWithValueFunction(T entity)
focal_class.identifier: FieldNameToArrayNotationWithValueFunction
focal_class.modifiers: public
focal_class.parameters: (T entity)
focal_class.signature:  FieldNameToArrayNotationWithValueFunction(T entity)
focal_class.class_method_signature: FieldNameToArrayNotationWithValueFunction.apply(Field field)
focal_class.full_signature: @Override public String apply(Field field)
focal_class.identifier: apply
focal_class.modifiers: @Override public
focal_class.parameters: (Field field)
focal_class.return: String
focal_class.signature: String apply(Field field)
focal_class.class_method_signature: FieldNameToArrayNotationWithValueFunction.asEncodedFieldRepresentation(String resourceId, String underscoredFieldName, Object value)
focal_class.full_signature: private String asEncodedFieldRepresentation(String resourceId, String underscoredFieldName, Object value)
focal_class.identifier: asEncodedFieldRepresentation
focal_class.modifiers: private
focal_class.parameters: (String resourceId, String underscoredFieldName, Object value)
focal_class.return: String
focal_class.signature: String asEncodedFieldRepresentation(String resourceId, String underscoredFieldName, Object value)
focal_class.class_method_signature: FieldNameToArrayNotationWithValueFunction.camelCaseToUnderscore(String fieldName)
focal_class.full_signature: @VisibleForTesting String camelCaseToUnderscore(String fieldName)
focal_class.identifier: camelCaseToUnderscore
focal_class.modifiers: @VisibleForTesting
focal_class.parameters: (String fieldName)
focal_class.return: String
focal_class.signature: String camelCaseToUnderscore(String fieldName)
focal_method.body: @VisibleForTesting
    String camelCaseToUnderscore(String fieldName) {
      List<Character> chars = newArrayList(asList(fieldName.toCharArray()));
  
      for (int i = 0; i < chars.size(); i++) {
        Character aChar = chars.get(i);
        if (Character.isUpperCase(aChar)) {
          chars.remove(i);
          chars.add(i, Character.toLowerCase(aChar));
          chars.add(i, '_');
        }
      }
  
      return Joiner.on("").join(chars);
    }
focal_method.class_method_signature: FieldNameToArrayNotationWithValueFunction.camelCaseToUnderscore(String fieldName)
focal_method.full_signature: @VisibleForTesting String camelCaseToUnderscore(String fieldName)
focal_method.identifier: camelCaseToUnderscore
focal_method.invocations: newArrayList asList toCharArray size get isUpperCase remove add toLowerCase add join on
focal_method.modifiers: @VisibleForTesting
focal_method.parameters: (String fieldName)
focal_method.return: String
focal_method.signature: String camelCaseToUnderscore(String fieldName)