BeanMappingsFluentBuilder implements BeanMappingsBuilder { @Override public List<MappingFileData> build(BeanContainer beanContainer, DestBeanCreator destBeanCreator, PropertyDescriptorFactory propertyDescriptorFactory) { Configuration configuration = null; if (mappingsDefinition.getConfiguration() != null) { configuration = mappingsDefinition.getConfiguration().build(beanContainer); } MappingFileData data = new MappingFileData(); data.setConfiguration(configuration); data.getClassMaps().addAll(mappingsDefinition.build(configuration, beanContainer, destBeanCreator, propertyDescriptorFactory)); return Arrays.asList(data); } BeanMappingsFluentBuilder(ELEngine elEngine); @Override List<MappingFileData> build(BeanContainer beanContainer, DestBeanCreator destBeanCreator, PropertyDescriptorFactory propertyDescriptorFactory);  }
@Test public void canBuild() { ELEngine elEngine = new DefaultELEngine(ELExpressionFactory.newInstance()); BeanMappingsFluentBuilder builder = new TestFluentBuilder(elEngine); BeanContainer beanContainer = new BeanContainer(); DestBeanCreator destBeanCreator = new DestBeanCreator(beanContainer); PropertyDescriptorFactory propertyDescriptorFactory = new PropertyDescriptorFactory(); List<MappingFileData> answer = builder.build(beanContainer, destBeanCreator, propertyDescriptorFactory); assertNotNull(answer); assertTrue(answer.size() > 0); }