title: How to convert a Groovy map to key="value" string?
body: <p>I need to take map and convert it to a string with the key/value pairs separated into key="value".
  I can do the following, and this works, but is there a "groovier" way to make this happen?</p>
  
  <pre><code>void "test map to string"() {
  given: "a map"
  Map fields = [class: 'blue', type:'sphere', size: 'large' ]
  
  when:
  StringBuilder stringBuilder = new StringBuilder()
  fields.each() { attr -&gt;
      stringBuilder.append(attr.key)
      stringBuilder.append("=")
      stringBuilder.append('"')
      stringBuilder.append(attr.value)
      stringBuilder.append('" ')
  }
  
  then: 'key/value pairs separated into key="value"'
  'class="blue" type="sphere" size="large" ' == stringBuilder.toString()
  }
  </code></pre>