@Test
public void testGetTargetBean()
{
TargetBean bean = new TargetBean();
bean.setStringProperty("2");
BindableBean form = new BindableBean();
form.setTargetBean(bean);
DomainClass domclass = new DomainClass(1);
bean.setDomainClass(domclass);
Object targetBean = PropertyValueGetter.getTargetBean(form, "targetBean");
assert targetBean instanceof TargetBean;
targetBean = PropertyValueGetter.getTargetBean(form, "targetBean.domainClass");
assert targetBean instanceof DomainClass;
bean.setDomainClass(null);
assert null == PropertyValueGetter.getTargetBean(form, "targetBean.domainClass");
form.setTargetBean(null);
assert null == PropertyValueGetter.getTargetBean(form, "targetBean.domainClass");
assert null == PropertyValueGetter.getTargetBean(form, "targetBean");