code: private ScriptText createScriptText(int key, BMRule rule)
     {
        StringBuilder builder = new StringBuilder();
        builder.append("# BMUnit autogenerated script: ").append(rule.name());
  
        builder.append("\nRULE ");
        builder.append(rule.name());
        if (rule.isInterface())
        {
           builder.append("\nINTERFACE ");
        }
        else
        {
           builder.append("\nCLASS ");
        }
  
        builder.append(rule.targetClass());
        builder.append("\nMETHOD ");
        builder.append(rule.targetMethod());
  
        String location = rule.targetLocation();
        if (location != null && location.length() > 0)
        {
           builder.append("\nAT ");
           builder.append(location);
        }
  
        String binding = rule.binding();
        if (binding != null && binding.length() > 0)
        {
           builder.append("\nBIND ");
           builder.append(binding);
        }
  
        String helper = rule.helper();
        if (helper != null && helper.length() > 0)
        {
           builder.append("\nHELPER ");
           builder.append(helper);
        }
  
        builder.append("\nIF ");
        builder.append(rule.condition());
        builder.append("\nDO ");
        builder.append(rule.action());
        builder.append("\nENDRULE\n");
  
        return new ScriptText("IronJacamarWithByteman" + key, builder.toString());
     }
docs: Create a ScriptText instance
  @param key The key
  @param rule The rule
  @return The ScriptText instance