test_class.declarator: reflectionBodyGenerator = new ReflectionBodyGenerator()
test_class.original_string: ReflectionBodyGenerator reflectionBodyGenerator = new ReflectionBodyGenerator();
test_class.type: ReflectionBodyGenerator
test_class.var_name: reflectionBodyGenerator
test_class.file: janbanery-core/src/test/java/pl/project13/janbanery/encoders/ReflectionBodyGeneratorTest.java
test_class.identifier: ReflectionBodyGeneratorTest
test_case.body: @Test
    public void testAsString() throws Exception {
      // given
      String title = "Title";
      String taskTypeName = "Bug";
      Task task = new Task(title, taskTypeName);
  
      // when
      String encodedString = reflectionBodyGenerator.asString(task);
  
      // then
      // (order of this items may vary, that's why contains() and not isEqualTo())
      assertThat(encodedString).contains("task[title]=Title");
      assertThat(encodedString).contains("&");
      assertThat(encodedString).contains("task[task_type_name]=Bug");
    }
test_case.class_method_signature: ReflectionBodyGeneratorTest.testAsString()
test_case.full_signature: @Test public void testAsString()
test_case.identifier: testAsString
test_case.invocations: asString contains assertThat contains assertThat contains assertThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAsString()
focal_class.declarator: log = LoggerFactory.getLogger(getClass())
focal_class.modifier: private
focal_class.original_string: private Logger log = LoggerFactory.getLogger(getClass());
focal_class.type: Logger
focal_class.var_name: log
focal_class.file: janbanery-core/src/main/java/pl/project13/janbanery/encoders/ReflectionBodyGenerator.java
focal_class.identifier: ReflectionBodyGenerator
focal_class.interfaces: implements FormUrlEncodedBodyGenerator
focal_class.class_method_signature: ReflectionBodyGenerator.ReflectionBodyGenerator()
focal_class.full_signature: public  ReflectionBodyGenerator()
focal_class.identifier: ReflectionBodyGenerator
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  ReflectionBodyGenerator()
focal_class.class_method_signature: ReflectionBodyGenerator.asString(T entity)
focal_class.full_signature: @Override public String asString(T entity)
focal_class.identifier: asString
focal_class.modifiers: @Override public
focal_class.parameters: (T entity)
focal_class.return: String
focal_class.signature: String asString(T entity)
focal_class.class_method_signature: ReflectionBodyGenerator.getAllFields(T entity)
focal_class.full_signature: private Collection<Field> getAllFields(T entity)
focal_class.identifier: getAllFields
focal_class.modifiers: private
focal_class.parameters: (T entity)
focal_class.return: Collection<Field>
focal_class.signature: Collection<Field> getAllFields(T entity)
focal_class.class_method_signature: ReflectionBodyGenerator.joinDataParts(Collection<String> formData)
focal_class.full_signature: @VisibleForTesting String joinDataParts(Collection<String> formData)
focal_class.identifier: joinDataParts
focal_class.modifiers: @VisibleForTesting
focal_class.parameters: (Collection<String> formData)
focal_class.return: String
focal_class.signature: String joinDataParts(Collection<String> formData)
focal_method.body: @Override
    public <T extends KanbaneryResource> String asString(T entity) {
      String resourceId = entity.getResourceId();
      log.info("Preparing form encoded data for: {}", resourceId);
  
      Collection<Field> fields = getAllFields(entity);
      log.info("{} has {} fields in total.", resourceId, fields.size());
  
      Collection<Field> fieldsToBeSet = filter(fields, new SettableNotNullFieldsPredicate<T>(entity));
      log.info("{} has {} fields to be set (not null and @Settable)", resourceId, fieldsToBeSet.size());
  
      Collection<String> fieldsWithValues = transform(fieldsToBeSet, new FieldNameToArrayNotationWithValueFunction<T>(entity));
      log.info("Prepared array notation of data for {}", resourceId);
  
      return joinDataParts(fieldsWithValues);
    }
focal_method.class_method_signature: ReflectionBodyGenerator.asString(T entity)
focal_method.full_signature: @Override public String asString(T entity)
focal_method.identifier: asString
focal_method.invocations: getResourceId info getAllFields info size filter info size transform info joinDataParts
focal_method.modifiers: @Override public
focal_method.parameters: (T entity)
focal_method.return: String
focal_method.signature: String asString(T entity)