test_class.declarator: converter = new DefaultFixtureMapper(new ConverterFactory()).getFixtureConverter()
test_class.original_string: FixtureConverter converter = new DefaultFixtureMapper(new ConverterFactory()).getFixtureConverter();
test_class.type: FixtureConverter
test_class.var_name: converter
test_class.file: beanmother-guava-converter/src/test/java/io/beanmother/guava/converter/OptionalTypeFixtureConverterTest.java
test_class.identifier: OptionalTypeFixtureConverterTest
test_case.body: @Test
      public void testOptionalMapping() {
          Map<String, Object> map = new HashMap<>();
          map.put("simple", 1);
          map.put("optionalString", "testString");
  
          Map<String, String> beanMap = new HashMap<>();
          beanMap.put("name", "testName");
          map.put("optionalBean", beanMap);
  
          FixtureTemplate fixture = FixtureTemplateWrapper.wrap(map, null, null);
  
          OptionalTest result = (OptionalTest) converter.convert(fixture, TypeToken.of(OptionalTest.class));
  
          assertEquals(1, result.simple.get());
          assertEquals("testString", result.optionalString.get());
          assertEquals("testName", result.optionalBean.get().name.get());
      }
test_case.class_method_signature: OptionalTypeFixtureConverterTest.testOptionalMapping()
test_case.full_signature: @Test public void testOptionalMapping()
test_case.identifier: testOptionalMapping
test_case.invocations: put put put put wrap convert of assertEquals get assertEquals get assertEquals get get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testOptionalMapping()
focal_class.declarator: fixtureConverter
focal_class.modifier: private
focal_class.original_string: private FixtureConverter fixtureConverter;
focal_class.type: FixtureConverter
focal_class.var_name: fixtureConverter
focal_class.file: beanmother-guava-converter/src/main/java/io/beanmother/guava/converter/OptionalTypeFixtureConverter.java
focal_class.identifier: OptionalTypeFixtureConverter
focal_class.interfaces: implements FixtureConverter
focal_class.class_method_signature: OptionalTypeFixtureConverter.OptionalTypeFixtureConverter(FixtureConverter converter)
focal_class.full_signature: public  OptionalTypeFixtureConverter(FixtureConverter converter)
focal_class.identifier: OptionalTypeFixtureConverter
focal_class.modifiers: public
focal_class.parameters: (FixtureConverter converter)
focal_class.signature:  OptionalTypeFixtureConverter(FixtureConverter converter)
focal_class.class_method_signature: OptionalTypeFixtureConverter.convert(FixtureTemplate fixtureTemplate, TypeToken typeToken)
focal_class.full_signature: @Override public Object convert(FixtureTemplate fixtureTemplate, TypeToken typeToken)
focal_class.identifier: convert
focal_class.modifiers: @Override public
focal_class.parameters: (FixtureTemplate fixtureTemplate, TypeToken typeToken)
focal_class.return: Object
focal_class.signature: Object convert(FixtureTemplate fixtureTemplate, TypeToken typeToken)
focal_method.body: @Override
      public Object convert(FixtureTemplate fixtureTemplate, TypeToken typeToken) {
          if (typeToken.getRawType() != Optional.class) {
              return fixtureConverter.convert(fixtureTemplate, typeToken);
          }
          List<TypeToken<?>> types = TypeTokenUtils.extractGenericTypeTokens(typeToken);
          if (types.isEmpty()) {
              if (fixtureTemplate instanceof FixtureValue) {
                  Object value = ((FixtureValue) fixtureTemplate).getValue();
                  return Optional.of(value);
              }
              return null;
          } else {
              return Optional.of(fixtureConverter.convert(fixtureTemplate, types.get(0)));
          }
      }
focal_method.class_method_signature: OptionalTypeFixtureConverter.convert(FixtureTemplate fixtureTemplate, TypeToken typeToken)
focal_method.full_signature: @Override public Object convert(FixtureTemplate fixtureTemplate, TypeToken typeToken)
focal_method.identifier: convert
focal_method.invocations: getRawType convert extractGenericTypeTokens isEmpty getValue of of convert get
focal_method.modifiers: @Override public
focal_method.parameters: (FixtureTemplate fixtureTemplate, TypeToken typeToken)
focal_method.return: Object
focal_method.signature: Object convert(FixtureTemplate fixtureTemplate, TypeToken typeToken)