### Question:
GenerationEngine { public String generateCompleteFieldString(GenerationContext generationContext, ObjectProperty attribute) throws Exception { return generateCompleteFieldString( generationContext, attribute, null ); }  static GenerationEngine getInstance(); void generate(GenerationContext generationContext); void generateAsset(GenerationContext generationContext, String template, String filePath); void generateConstructors(GenerationContext generationContext, String template); void generateAttribute(GenerationContext generationContext, ObjectProperty attribute, String template); void generateMethod( GenerationContext generationContext, Method method, String template); void generateNestedClass( GenerationContext generationContext, JavaClass nestedClass, String template); void generateSetterGetter(GenerationContext generationContext, ObjectProperty attribute, String template); void generateEquals(GenerationContext generationContext, String template); void generateHashCode(GenerationContext generationContext, String template); void generateTypeAnnotation(GenerationContext generationContext, Annotation annotation, String template); void generateFieldAnnotation(GenerationContext generationContext, Annotation annotation, String template); void generateSubTemplate(GenerationContext generationContext, String template); String generateDefaultConstructorString(GenerationContext generationContext, DataObject dataObject); String generateAllFieldsConstructorString(GenerationContext generationContext, DataObject dataObject); String generateKeyFieldsConstructorString(GenerationContext generationContext, DataObject dataObject); String generatePositionFieldsConstructorString(GenerationContext generationContext, DataObject dataObject); String generateAnnotationString(GenerationContext generationContext, Annotation annotation); String generateMethodString(GenerationContext generationContext, Method method, String indent); String generateMethodString(GenerationContext generationContext, Method method); String generateNestedClassString(GenerationContext generationContext, JavaClass javaClass, String indent); String generateNestedClassString(GenerationContext generationContext, JavaClass javaClass); String generateFieldString(GenerationContext generationContext, ObjectProperty attribute); String generateFieldGetterString(GenerationContext generationContext, ObjectProperty attribute); String generateFieldSetterString(GenerationContext generationContext, ObjectProperty attribute); String generateEqualsString(GenerationContext generationContext, DataObject dataObject, String indent); String generateEqualsString(GenerationContext generationContext, DataObject dataObject); String generateHashCodeString(GenerationContext generationContext, DataObject dataObject, String indent); String generateHashCodeString(GenerationContext generationContext, DataObject dataObject); String generateAllConstructorsString(GenerationContext generationContext, DataObject dataObject); String generateAllConstructorsString(GenerationContext generationContext, DataObject dataObject, String indent); String generateAllAnnotationsString(GenerationContext generationContext, HasAnnotations hasAnnotations); String generateAllAnnotationsString(GenerationContext generationContext, HasAnnotations hasAnnotations, String indent); String generateCompleteFieldString(GenerationContext generationContext, ObjectProperty attribute); String generateCompleteFieldString(GenerationContext generationContext, ObjectProperty attribute, String indent); String generateFieldGetterSetterString(GenerationContext generationContext, ObjectProperty attribute); String generateFieldGetterSetterString(GenerationContext generationContext, ObjectProperty attribute, String indent); String generateJavaClassString(GenerationContext generationContext, DataObject dataObject); String generateSubTemplateString(GenerationContext generationContext, String template); static String indentLines(String source, String indent);  }### Answer:
@Test public void testCompleteFieldStringGeneration() { DataModel dataModel = dataModelOracleDriver.createModel(); DataObject object1 = dataModel.addDataObject("com.test.Object1"); ObjectProperty prop1 = object1.addProperty("attribute1", "java.lang.String"); Annotation label = new AnnotationImpl( annotationDefinitions.get( org.kie.api.definition.type.Label.class.getName() ) ); label.setValue( "value", "Attribute 1" ); Annotation desc = new AnnotationImpl( annotationDefinitions.get( org.kie.api.definition.type.Description.class.getName() ) ); desc.setValue( "value", "Description for Attribute 1" ); Annotation key = new AnnotationImpl( annotationDefinitions.get( org.kie.api.definition.type.Key.class.getName() ) ); Annotation position = new AnnotationImpl( annotationDefinitions.get( org.kie.api.definition.type.Position.class.getName() ) ); position.setValue( "value", "0" ); prop1.addAnnotation( label ); prop1.addAnnotation( desc ); prop1.addAnnotation( key ); prop1.addAnnotation( position ); GenerationContext generationContext = new GenerationContext( dataModelOracleDriver.createModel() ); try { String result = engine.generateCompleteFieldString(generationContext, prop1); assertEquals( results.getProperty( "testCompleteFieldStringGeneration" ), result ); } catch ( Exception e ) { e.printStackTrace(); } }