@@ -0,0 +1,1292 @@
+package com.xaadin.elementfactory;%0A%0Aimport com.vaadin.ui.Alignment;%0Aimport com.vaadin.ui.Button;%0Aimport com.vaadin.ui.HorizontalLayout;%0Aimport com.xaadin.VisualTreeNodeImpl;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.mockito.Mockito;%0A%0Aimport static org.fest.assertions.api.Assertions.assertThat;%0A%0A/**%0A * Created by Hendrik J%C3%BCrgens on 27.01.14.%0A */%0Apublic class AbstractDefaultLayoutElementFactoryTest %7B%0A%0A    private AbstractDefaultLayoutElementFactory factory;%0A%0A    @Before%0A    public void setUp() throws Exception %7B%0A        factory = Mockito.mock(AbstractDefaultLayoutElementFactory.class, Mockito.CALLS_REAL_METHODS);%0A    %7D%0A%0A    @Test%0A    public void testAddComponentToParent() throws Exception %7B%0A        HorizontalLayout layout = new HorizontalLayout();%0A%0A        Button button = new Button();%0A        VisualTreeNodeImpl buttonVisualTreeNode = new VisualTreeNodeImpl(button);%0A        buttonVisualTreeNode.setAdditionalParameter(%22alignment%22, %22BOTTOM_RIGHT%22);%0A%0A        factory.addComponentToParent(new VisualTreeNodeImpl(layout), buttonVisualTreeNode);%0A%0A        assertThat(layout.getComponentCount()).isEqualTo(1);%0A        assertThat(layout.getComponent(0)).isSameAs(button);%0A        assertThat(layout.getComponentAlignment(button)).isEqualTo(Alignment.BOTTOM_RIGHT);%0A    %7D%0A%7D%0A

Add test for AbstractDefaultLayoutElementFactory