@Test
public void doesNotOverrideMethodsFromSuperclassesMarkedWithAnnotation() throws Exception {
BeanSubClass bean = generator.generate(BeanSubClass.class).newInstance();
IConventionAware conventionAware = (IConventionAware) bean;
conventionAware.getConventionMapping().map(GUtil.map(
"property", new ConventionValue(){
public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
throw new UnsupportedOperationException();
}
},
"interfaceProperty", new ConventionValue(){
public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
throw new UnsupportedOperationException();
}
},
"overriddenProperty", new ConventionValue(){
public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
return "conventionValue";
}
},
"otherProperty", new ConventionValue(){
public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
return "conventionValue";
}
}));
assertEquals(null, bean.getProperty());