test_class.declarator: store = new DefaultFixturesStore()
test_class.original_string: FixturesStore store = new DefaultFixturesStore();
test_class.type: FixturesStore
test_class.var_name: store
test_class.declarator: fixtureConverter = new DefaultFixtureMapper(new ConverterFactory()).getFixtureConverter()
test_class.original_string: FixtureConverter fixtureConverter = new DefaultFixtureMapper(new ConverterFactory()).getFixtureConverter();
test_class.type: FixtureConverter
test_class.var_name: fixtureConverter
test_class.file: beanmother-core/src/test/java/io/beanmother/core/mapper/ConstructHelperTest.java
test_class.identifier: ConstructHelperTest
test_case.body: @Test
      public void testSingleArgConstructor() {
          FixtureMap fixtureMap = store.reproduce("single-arg-constructor");
          Object obj = ConstructHelper.construct(SingleArgsConstuctorClass.class, fixtureMap, fixtureConverter);
  
          assertTrue(obj instanceof SingleArgsConstuctorClass);
      }
test_case.class_method_signature: ConstructHelperTest.testSingleArgConstructor()
test_case.full_signature: @Test public void testSingleArgConstructor()
test_case.identifier: testSingleArgConstructor
test_case.invocations: reproduce construct assertTrue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSingleArgConstructor()
focal_class.declarator: CONSTRUCT_KEY = "_construct"
focal_class.modifier: private final static
focal_class.original_string: private final static String CONSTRUCT_KEY = "_construct";
focal_class.type: String
focal_class.var_name: CONSTRUCT_KEY
focal_class.file: beanmother-core/src/main/java/io/beanmother/core/mapper/ConstructHelper.java
focal_class.identifier: ConstructHelper
focal_class.class_method_signature: ConstructHelper.construct(Class<?> type, FixtureMap fixtureMap, FixtureConverter fixtureConverter)
focal_class.full_signature: @SuppressWarnings("unchecked") public static Object construct(Class<?> type, FixtureMap fixtureMap, FixtureConverter fixtureConverter)
focal_class.identifier: construct
focal_class.modifiers: @SuppressWarnings("unchecked") public static
focal_class.parameters: (Class<?> type, FixtureMap fixtureMap, FixtureConverter fixtureConverter)
focal_class.return: Object
focal_class.signature: Object construct(Class<?> type, FixtureMap fixtureMap, FixtureConverter fixtureConverter)
focal_class.class_method_signature: ConstructHelper.constructByFixtureList(Class<?> type, FixtureList fixtureList, FixtureConverter fixtureConverter)
focal_class.full_signature: private static Object constructByFixtureList(Class<?> type, FixtureList fixtureList, FixtureConverter fixtureConverter)
focal_class.identifier: constructByFixtureList
focal_class.modifiers: private static
focal_class.parameters: (Class<?> type, FixtureList fixtureList, FixtureConverter fixtureConverter)
focal_class.return: Object
focal_class.signature: Object constructByFixtureList(Class<?> type, FixtureList fixtureList, FixtureConverter fixtureConverter)
focal_class.class_method_signature: ConstructHelper.constructByFixtureValue(Class<?> type, FixtureValue fixtureValue, FixtureConverter fixtureConverter)
focal_class.full_signature: @SuppressWarnings("unchecked") private static Object constructByFixtureValue(Class<?> type, FixtureValue fixtureValue, FixtureConverter fixtureConverter)
focal_class.identifier: constructByFixtureValue
focal_class.modifiers: @SuppressWarnings("unchecked") private static
focal_class.parameters: (Class<?> type, FixtureValue fixtureValue, FixtureConverter fixtureConverter)
focal_class.return: Object
focal_class.signature: Object constructByFixtureValue(Class<?> type, FixtureValue fixtureValue, FixtureConverter fixtureConverter)
focal_method.body: @SuppressWarnings("unchecked")
      public static Object construct(Class<?> type, FixtureMap fixtureMap, FixtureConverter fixtureConverter) {
          final Constructor<?>[] constructs = type.getConstructors();
          if (constructs.length == 0) throw new UnsupportedOperationException("can not create an instance. " + type + " does not have a constructor.");
  
          Object newInstance = null;
  
          if (fixtureMap.containsKey(CONSTRUCT_KEY)) {
              FixtureTemplate constructorFixture = fixtureMap.get(CONSTRUCT_KEY);
  
              if (constructorFixture instanceof FixtureValue) {
                  newInstance = constructByFixtureValue(type, (FixtureValue) constructorFixture, fixtureConverter);
              } else if (constructorFixture instanceof FixtureList) {
                  newInstance = constructByFixtureList(type, (FixtureList) constructorFixture, fixtureConverter);
              }
          }
  
          if (newInstance == null) {
              try {
                  newInstance = type.newInstance();
              } catch (Exception e) {
                  throw new FixtureMappingException(type, fixtureMap, e);
              }
          }
  
          return newInstance;
      }
focal_method.class_method_signature: ConstructHelper.construct(Class<?> type, FixtureMap fixtureMap, FixtureConverter fixtureConverter)
focal_method.full_signature: @SuppressWarnings("unchecked") public static Object construct(Class<?> type, FixtureMap fixtureMap, FixtureConverter fixtureConverter)
focal_method.identifier: construct
focal_method.invocations: getConstructors containsKey get constructByFixtureValue constructByFixtureList newInstance
focal_method.modifiers: @SuppressWarnings("unchecked") public static
focal_method.parameters: (Class<?> type, FixtureMap fixtureMap, FixtureConverter fixtureConverter)
focal_method.return: Object
focal_method.signature: Object construct(Class<?> type, FixtureMap fixtureMap, FixtureConverter fixtureConverter)