// Path: bean-grid-addon/src/test/java/com/vaadin/peter/addon/beangrid/testmaterial/BeanWithDoubleDefinitions.java
// public class BeanWithDoubleDefinitions {
// 
// 	@GridColumn(translationKey = "first.name", defaultOrder = 0, defaultVisible = true)
// 	private String firstname;
// 
// 	@GridColumn(translationKey = "first.name", defaultOrder = 0, defaultVisible = true)
// 	public String getFirstname() {
// 		return firstname;
// 	}
// }
// 
// Path: bean-grid-addon/src/test/java/com/vaadin/peter/addon/beangrid/testmaterial/SimpleBean.java
// public class SimpleBean {
// 
// 	private String firstname;
// 	private String lastname;
// 
// 	@GridColumn(translationKey = "first.name", defaultOrder = 0, defaultVisible = true)
// 	public String getFirstname() {
// 		return firstname;
// 	}
// 
// 	public void setFirstname(String firstname) {
// 		this.firstname = firstname;
// 	}
// 
// 	@GridColumn(translationKey = "last.name", defaultOrder = 1, defaultVisible = true)
// 	public String getLastname() {
// 		return lastname;
// 	}
// 
// 	public void setLastname(String lastname) {
// 		this.lastname = lastname;
// 	}
// }
// 
// Path: bean-grid-addon/src/test/java/com/vaadin/peter/addon/beangrid/testmaterial/SimpleBeanFieldDefinitions.java
// public class SimpleBeanFieldDefinitions {
// 
// 	@GridColumn(translationKey = "first.name", defaultOrder = 0)
// 	private String firstname;
// 
// 	@GridColumn(translationKey = "last.name", defaultOrder = 1)
// 	private String lastname;
// 
// 	public String getFirstname() {
// 		return firstname;
// 	}
// 
// 	public String getLastname() {
// 		return lastname;
// 	}
// }
// 
// Path: bean-grid-addon/src/test/java/com/vaadin/peter/addon/beangrid/testmaterial/SimpleBeanWithBaseClass.java
// public class SimpleBeanWithBaseClass extends AbstractBaseBean {
// 
// 	private String firstname;
// 	private String lastname;
// 
// 	@GridColumn(translationKey = "first.name", defaultOrder = 2, defaultVisible = true)
// 	public String getFirstname() {
// 		return firstname;
// 	}
// 
// 	public void setFirstname(String firstname) {
// 		this.firstname = firstname;
// 	}
// 
// 	@GridColumn(translationKey = "last.name", defaultOrder = 3, defaultVisible = true)
// 	public String getLastname() {
// 		return lastname;
// 	}
// 
// 	public void setLastname(String lastname) {
// 		this.lastname = lastname;
// 	}
// }
// 
// Path: bean-grid-addon/src/test/java/com/vaadin/peter/addon/beangrid/testmaterial/SimpleBeanWithOnlyWriteMethod.java
// public class SimpleBeanWithOnlyWriteMethod {
// 
// 	@GridColumn(translationKey = "id", defaultOrder = 0)
// 	private int id;
// 
// 	public void setId(int id) {
// 		this.id = id;
// 	}
// }
// 
// Path: bean-grid-addon/src/test/java/com/vaadin/peter/addon/beangrid/testmaterial/SimpleBeanWithoutReadMethod.java
// public class SimpleBeanWithoutReadMethod {
// 
// 	@GridColumn(translationKey = "id", defaultOrder = 0)
// 	private int id;
// }


import java.time.LocalDate;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.vaadin.peter.addon.beangrid.testmaterial.BeanWithDoubleDefinitions;
import com.vaadin.peter.addon.beangrid.testmaterial.SimpleBean;
import com.vaadin.peter.addon.beangrid.testmaterial.SimpleBeanFieldDefinitions;
import com.vaadin.peter.addon.beangrid.testmaterial.SimpleBeanWithBaseClass;
import com.vaadin.peter.addon.beangrid.testmaterial.SimpleBeanWithOnlyWriteMethod;
import com.vaadin.peter.addon.beangrid.testmaterial.SimpleBeanWithoutReadMethod;
		Assert.assertEquals(4, columnDefinitions.size());

		Assert.assertEquals("id", columnDefinitions.get(0).getTranslationKey());
		Assert.assertEquals(0, columnDefinitions.get(0).getDefaultOrderNumber());
		Assert.assertEquals("id", columnDefinitions.get(0).getPropertyName());
		Assert.assertEquals(Integer.class, columnDefinitions.get(0).getPropertyType());

		Assert.assertEquals("birth.date", columnDefinitions.get(1).getTranslationKey());
		Assert.assertEquals(1, columnDefinitions.get(1).getDefaultOrderNumber());
		Assert.assertEquals("birthDate", columnDefinitions.get(1).getPropertyName());
		Assert.assertEquals(LocalDate.class, columnDefinitions.get(1).getPropertyType());

		Assert.assertEquals("first.name", columnDefinitions.get(2).getTranslationKey());
		Assert.assertEquals(2, columnDefinitions.get(2).getDefaultOrderNumber());
		Assert.assertEquals("firstname", columnDefinitions.get(2).getPropertyName());
		Assert.assertEquals(String.class, columnDefinitions.get(2).getPropertyType());

		Assert.assertEquals("last.name", columnDefinitions.get(3).getTranslationKey());
		Assert.assertEquals(3, columnDefinitions.get(3).getDefaultOrderNumber());
		Assert.assertEquals("lastname", columnDefinitions.get(3).getPropertyName());
		Assert.assertEquals(String.class, columnDefinitions.get(3).getPropertyType());
	}

	@Test
	public void testColumnDefinitionLookup_simpleBeanWithFieldDefinitions_definitionsFound() {
		List<ColumnDefinition> columnDefinitions = GridConfigurationTools
				.discoverColumnDefinitions(SimpleBeanFieldDefinitions.class);
		Assert.assertEquals(2, columnDefinitions.size());

		Assert.assertEquals("first.name", columnDefinitions.get(0).getTranslationKey());
// Path: bean-grid-addon/src/test/java/com/vaadin/peter/addon/beangrid/testmaterial/BeanWithDoubleDefinitions.java
// public class BeanWithDoubleDefinitions {
// 
// 	@GridColumn(translationKey = "first.name", defaultOrder = 0, defaultVisible = true)
// 	private String firstname;
// 
// 	@GridColumn(translationKey = "first.name", defaultOrder = 0, defaultVisible = true)
// 	public String getFirstname() {
// 		return firstname;
// 	}
// }
// 
// Path: bean-grid-addon/src/test/java/com/vaadin/peter/addon/beangrid/testmaterial/SimpleBean.java
// public class SimpleBean {
// 
// 	private String firstname;
// 	private String lastname;
// 
// 	@GridColumn(translationKey = "first.name", defaultOrder = 0, defaultVisible = true)
// 	public String getFirstname() {
// 		return firstname;
// 	}
// 
// 	public void setFirstname(String firstname) {
// 		this.firstname = firstname;
// 	}
// 
// 	@GridColumn(translationKey = "last.name", defaultOrder = 1, defaultVisible = true)
// 	public String getLastname() {
// 		return lastname;
// 	}
// 
// 	public void setLastname(String lastname) {
// 		this.lastname = lastname;
// 	}
// }
// 
// Path: bean-grid-addon/src/test/java/com/vaadin/peter/addon/beangrid/testmaterial/SimpleBeanFieldDefinitions.java
// public class SimpleBeanFieldDefinitions {
// 
// 	@GridColumn(translationKey = "first.name", defaultOrder = 0)
// 	private String firstname;
// 
// 	@GridColumn(translationKey = "last.name", defaultOrder = 1)
// 	private String lastname;
// 
// 	public String getFirstname() {
// 		return firstname;
// 	}
// 
// 	public String getLastname() {
// 		return lastname;
// 	}
// }
// 
// Path: bean-grid-addon/src/test/java/com/vaadin/peter/addon/beangrid/testmaterial/SimpleBeanWithBaseClass.java
// public class SimpleBeanWithBaseClass extends AbstractBaseBean {
// 
// 	private String firstname;
// 	private String lastname;
// 
// 	@GridColumn(translationKey = "first.name", defaultOrder = 2, defaultVisible = true)
// 	public String getFirstname() {
// 		return firstname;
// 	}
// 
// 	public void setFirstname(String firstname) {
// 		this.firstname = firstname;
// 	}
// 
// 	@GridColumn(translationKey = "last.name", defaultOrder = 3, defaultVisible = true)
// 	public String getLastname() {
// 		return lastname;
// 	}
// 
// 	public void setLastname(String lastname) {
// 		this.lastname = lastname;
// 	}
// }
// 
// Path: bean-grid-addon/src/test/java/com/vaadin/peter/addon/beangrid/testmaterial/SimpleBeanWithOnlyWriteMethod.java
// public class SimpleBeanWithOnlyWriteMethod {
// 
// 	@GridColumn(translationKey = "id", defaultOrder = 0)
// 	private int id;
// 
// 	public void setId(int id) {
// 		this.id = id;
// 	}
// }
// 
// Path: bean-grid-addon/src/test/java/com/vaadin/peter/addon/beangrid/testmaterial/SimpleBeanWithoutReadMethod.java
// public class SimpleBeanWithoutReadMethod {
// 
// 	@GridColumn(translationKey = "id", defaultOrder = 0)
// 	private int id;
// }


// Path: bean-grid-addon/src/test/java/com/vaadin/peter/addon/beangrid/TestColumnDefinitions.java
import java.time.LocalDate;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.vaadin.peter.addon.beangrid.testmaterial.BeanWithDoubleDefinitions;
import com.vaadin.peter.addon.beangrid.testmaterial.SimpleBean;
import com.vaadin.peter.addon.beangrid.testmaterial.SimpleBeanFieldDefinitions;
import com.vaadin.peter.addon.beangrid.testmaterial.SimpleBeanWithBaseClass;
import com.vaadin.peter.addon.beangrid.testmaterial.SimpleBeanWithOnlyWriteMethod;
import com.vaadin.peter.addon.beangrid.testmaterial.SimpleBeanWithoutReadMethod;

		Assert.assertEquals(4, columnDefinitions.size());

		Assert.assertEquals("id", columnDefinitions.get(0).getTranslationKey());
		Assert.assertEquals(0, columnDefinitions.get(0).getDefaultOrderNumber());
		Assert.assertEquals("id", columnDefinitions.get(0).getPropertyName());
		Assert.assertEquals(Integer.class, columnDefinitions.get(0).getPropertyType());

		Assert.assertEquals("birth.date", columnDefinitions.get(1).getTranslationKey());
		Assert.assertEquals(1, columnDefinitions.get(1).getDefaultOrderNumber());
		Assert.assertEquals("birthDate", columnDefinitions.get(1).getPropertyName());
		Assert.assertEquals(LocalDate.class, columnDefinitions.get(1).getPropertyType());

		Assert.assertEquals("first.name", columnDefinitions.get(2).getTranslationKey());
		Assert.assertEquals(2, columnDefinitions.get(2).getDefaultOrderNumber());
		Assert.assertEquals("firstname", columnDefinitions.get(2).getPropertyName());
		Assert.assertEquals(String.class, columnDefinitions.get(2).getPropertyType());

		Assert.assertEquals("last.name", columnDefinitions.get(3).getTranslationKey());
		Assert.assertEquals(3, columnDefinitions.get(3).getDefaultOrderNumber());
		Assert.assertEquals("lastname", columnDefinitions.get(3).getPropertyName());
		Assert.assertEquals(String.class, columnDefinitions.get(3).getPropertyType());
	}

	@Test
	public void testColumnDefinitionLookup_simpleBeanWithFieldDefinitions_definitionsFound() {
		List<ColumnDefinition> columnDefinitions = GridConfigurationTools
				.discoverColumnDefinitions(SimpleBeanFieldDefinitions.class);
		Assert.assertEquals(2, columnDefinitions.size());

		Assert.assertEquals("first.name", columnDefinitions.get(0).getTranslationKey());
		Assert.assertEquals(0, columnDefinitions.get(0).getDefaultOrderNumber());