code: protected File generateTemplate(File template, Instance instance) throws IOException {
  
  		String scriptName = instance.getName().replace( "\\s+", "_" );
  		File generated = File.createTempFile( scriptName, ".script");
  		InstanceTemplateHelper.injectInstanceImports(instance, template, generated);
  
  		return generated;
  	}
docs: Generates a file from the template and the instance.
  @param template
  @param instance
  @return the generated file
  @throws IOException