@@ -0,0 +1,2199 @@
+package com.vaadin.tests.components.form;%0D%0A%0D%0Aimport com.vaadin.data.Item;%0D%0Aimport com.vaadin.data.util.BeanItem;%0D%0Aimport com.vaadin.tests.components.TestBase;%0D%0Aimport com.vaadin.ui.Form;%0D%0Aimport com.vaadin.ui.HorizontalLayout;%0D%0A%0D%0Apublic class FormFieldCaptions extends TestBase %7B%0D%0A%0D%0A    @Override%0D%0A    protected void setup() %7B%0D%0A        // Method 1%0D%0A        Form form1 = new Form();%0D%0A        Item item1 = createItem();%0D%0A        for (Object propertyId : item1.getItemPropertyIds()) %7B%0D%0A            form1%0D%0A                    .addItemProperty(propertyId, item1%0D%0A                            .getItemProperty(propertyId));%0D%0A        %7D%0D%0A%0D%0A        // Method 2%0D%0A%0D%0A        Form form2 = new Form();%0D%0A        Item item2 = createItem();%0D%0A        form2.setItemDataSource(item2);%0D%0A%0D%0A        // Layout%0D%0A        HorizontalLayout hl = new HorizontalLayout();%0D%0A        hl.addComponent(form1);%0D%0A        hl.addComponent(form2);%0D%0A%0D%0A        addComponent(hl);%0D%0A    %7D%0D%0A%0D%0A    private Item createItem() %7B%0D%0A        return new BeanItem%3CPerson%3E(new Person(%22John%22, %22Doe%22, 38));%0D%0A    %7D%0D%0A%0D%0A    public class Person %7B%0D%0A        private String firstName;%0D%0A        private String lastName;%0D%0A%0D%0A        public Person(String firstName, String lastName, int age) %7B%0D%0A            super();%0D%0A            this.firstName = firstName;%0D%0A            this.lastName = lastName;%0D%0A            this.age = age;%0D%0A        %7D%0D%0A%0D%0A        public String getFirstName() %7B%0D%0A            return firstName;%0D%0A        %7D%0D%0A%0D%0A        public void setFirstName(String firstName) %7B%0D%0A            this.firstName = firstName;%0D%0A        %7D%0D%0A%0D%0A        public String getLastName() %7B%0D%0A            return lastName;%0D%0A        %7D%0D%0A%0D%0A        public void setLastName(String lastName) %7B%0D%0A            this.lastName = lastName;%0D%0A        %7D%0D%0A%0D%0A        public int getAge() %7B%0D%0A            return age;%0D%0A        %7D%0D%0A%0D%0A        public void setAge(int age) %7B%0D%0A            this.age = age;%0D%0A        %7D%0D%0A%0D%0A        private int age;%0D%0A    %7D%0D%0A%0D%0A    @Override%0D%0A    protected String getDescription() %7B%0D%0A        return %22The two forms generated using different methods should have the same captions for all fields%22;%0D%0A    %7D%0D%0A%0D%0A    @Override%0D%0A    protected Integer getTicketNumber() %7B%0D%0A        return 3554;%0D%0A    %7D%0D%0A%0D%0A%7D%0D%0A

Test case for #3554