public void canGetAllProperties() {
Bean parent = new Bean();
parent.defineProperty("parentProperty", "parentProperty");
parent.setReadWriteProperty("ignore me");
parent.doSetReadOnlyProperty("ignore me");
Convention parentConvention = parent.extensibleDynamicObject.getConvention();
parentConvention.getPlugins().put("parent", new ConventionBean());
GroovyBean bean = new GroovyBean();
bean.defineProperty("additional", "additional");
bean.setReadWriteProperty("readWriteProperty");
bean.doSetReadOnlyProperty("readOnlyProperty");
bean.setGroovyProperty("groovyProperty");
Convention convention = bean.extensibleDynamicObject.getConvention();
ConventionBean conventionBean = new ConventionBean();
conventionBean.setConventionProperty("conventionProperty");
convention.getPlugins().put("bean", conventionBean);
bean.setParent(parent.getAsDynamicObject());
Map<String, Object> properties = bean.getProperties();
assertThat(properties.get("properties"), sameInstance((Object) properties));
assertThat(properties.get("readWriteProperty"), equalTo((Object) "readWriteProperty"));