@SuppressWarnings("unchecked") @Test public void createObjectDirectMappingComplexType() { Map<List<String>, Object> params = new HashMap<>(); Person directMappingComplexTypeValue = new Person(); directMappingComplexTypeValue.setFirstName("TestName"); params.put(emptyList(), directMappingComplexTypeValue); params.put(singletonList("age"), 10); ValueWrapper<Object> initialInstance = runnerHelper.getDirectMapping(params); Object objectRaw = runnerHelper.createObject( initialInstance, Map.class.getCanonicalName(), params, this.getClass().getClassLoader()); assertTrue(objectRaw instanceof Person); Person object = (Person) objectRaw; assertEquals(10, object.getAge()); assertEquals("TestName", object.getFirstName()); }
@Override protected Object createObject(ValueWrapper<Object> initialInstance, String className, Map<List<String>, Object> params, ClassLoader classLoader) { return fillBean(initialInstance, className, params, classLoader); }
RuleScenarioRunnerHelper extends AbstractRunnerHelper { @Override protected Object createObject(ValueWrapper<Object> initialInstance, String className, Map<List<String>, Object> params, ClassLoader classLoader) { return fillBean(initialInstance, className, params, classLoader); } }
RuleScenarioRunnerHelper extends AbstractRunnerHelper { @Override protected Object createObject(ValueWrapper<Object> initialInstance, String className, Map<List<String>, Object> params, ClassLoader classLoader) { return fillBean(initialInstance, className, params, classLoader); }  }
RuleScenarioRunnerHelper extends AbstractRunnerHelper { @Override protected Object createObject(ValueWrapper<Object> initialInstance, String className, Map<List<String>, Object> params, ClassLoader classLoader) { return fillBean(initialInstance, className, params, classLoader); }   }
RuleScenarioRunnerHelper extends AbstractRunnerHelper { @Override protected Object createObject(ValueWrapper<Object> initialInstance, String className, Map<List<String>, Object> params, ClassLoader classLoader) { return fillBean(initialInstance, className, params, classLoader); }    }