code: public static void injectInstanceImports(Instance instance, String templateFilePath, File targetFile)
  	throws IOException {
  
  		OutputStream os = null;
  		try {
  			os = new FileOutputStream( targetFile );
  			OutputStreamWriter writer = new OutputStreamWriter( os, StandardCharsets.UTF_8.newEncoder());
  			injectInstanceImports( instance, templateFilePath, writer );
  
  		} finally {
  			Utils.closeQuietly( os );
  		}
  	}
docs: Reads the import values of the instances and injects them into the template file.
  <p>
  See test resources to see the associated way to write templates
  </p>
  
  @param instance the instance whose imports must be injected
  @param templateFilePath the path of the template file
  @param targetFile the file to write into
  @throws IOException if something went wrong