property.setDefaultValueFactory(new SingletonObjectFactory<String>("foo"));
property.setMember(JavaBuilderPropertyTestCase.Foo.class.getMethod("setTest", String.class));
type.add(property);
type.setConstructorDefinition(new ConstructorDefinition<Foo>(Foo.class.getConstructor((Class[]) null)));
type.setImplementationScope(Scope.STATELESS);
JavaImplementation impl = new JavaImplementation();
impl.setComponentType(type);
impl.setImplementationClass(Foo.class);
ComponentDefinition<JavaImplementation> definition = new ComponentDefinition<JavaImplementation>(impl);
PropertyValue propertyValue = new PropertyValue(property.getName(), property.getDefaultValueFactory());
definition.getPropertyValues().put(property.getName(), propertyValue);
AtomicComponent component = builder.build(parent, definition, deploymentContext);
JavaBuilderPropertyTestCase.Foo foo = (JavaBuilderPropertyTestCase.Foo) component.createInstance();