}
@Test(groups="fast")
public void testNestedPropertySort() throws Exception {
List<TestBean> beans = new ArrayList<TestBean>();
beans.add(new TestBean());
beans.get(beans.size()-1).setNestedBean(new TestBean());
beans.get(beans.size()-1).getNestedBean().setEnumProperty(TestEnum.Fourth);
beans.add(new TestBean());
beans.get(beans.size()-1).setNestedBean(new TestBean());
beans.get(beans.size()-1).getNestedBean().setEnumProperty(TestEnum.Second);
beans.add(new TestBean());
beans.get(beans.size()-1).setNestedBean(new TestBean());
beans.get(beans.size()-1).getNestedBean().setEnumProperty(TestEnum.Ninth);
beans.add(new TestBean());
beans.get(beans.size()-1).setNestedBean(new TestBean());
beans.get(beans.size()-1).getNestedBean().setEnumProperty(TestEnum.Eight);
beans.add(new TestBean());
beans.get(beans.size()-1).setNestedBean(new TestBean());
beans.get(beans.size()-1).getNestedBean().setEnumProperty(TestEnum.First);
Collections.sort(beans, new BeanComparator("nestedBean.enumProperty"));
Assert.assertEquals(beans.get(0).getNestedBean().getEnumProperty(), TestEnum.First);
Assert.assertEquals(beans.get(1).getNestedBean().getEnumProperty(), TestEnum.Second);