### Question:
PresentationModelObjectClassGen extends AbstractPresentationModelObjectClassGen { @Override public void defineFields() { JFieldVar var = definedClass.field(JMod.FINAL, presentationModelClass, "presentationModel"); presentationModelField = JExpr.refthis(var.name()); presentationModelFieldWithoutThis = JExpr.ref(var.name()); } PresentationModelObjectClassGen(PresentationModelInfo presentationModelInfo); @Override void defineFields(); @Override void defineConstructor();  }### Answer:
@Test public void shouldDefineTryToCreateProperty() { PresentationModelInfo presentationModelInfo = createPresentationModelInfoFor(DefineTryToCreateProperty.class); PresentationModelObjectClassGen gen = new PresentationModelObjectClassGen(presentationModelInfo); gen.defineFields(); gen.defineTryToCreateProperty(); assertOutputSameTextFile(gen, "DefineTryToCreateProperty_PM.java.txt"); }
@Test public void shouldDefineTryToCreateDataSetProperty() { PresentationModelInfo presentationModelInfo = createPresentationModelInfoFor(DefineTryToCreateDataSetProperty.class); PresentationModelObjectClassGen gen = new PresentationModelObjectClassGen(presentationModelInfo); gen.defineFields(); gen.defineTryToCreateDataSetProperty(); assertOutputSameTextFile(gen, "DefineTryToCreateDataSetProperty_PM.java.txt"); }
@Test public void shouldDefineTryToCreateFunction() { PresentationModelInfo presentationModelInfo = createPresentationModelInfoFor(DefineTryToCreateFunction.class); PresentationModelObjectClassGen gen = new PresentationModelObjectClassGen(presentationModelInfo); gen.defineFields(); gen.defineTryToCreateFunction(); assertOutputSameTextFile(gen, "DefineTryToCreateFunction_PM.java.txt"); }