code: @When("^I index a document in the index named '(.+?)' using the mapping named '(.+?)' with key '(.+?)' and value '(.+?)'$")
      public void indexElasticsearchDocument(String indexName, String mappingName, String key, String value) throws Exception {
          ArrayList<XContentBuilder> mappingsource = new ArrayList<XContentBuilder>();
          XContentBuilder builder = jsonBuilder().startObject().field(key, value).endObject();
          mappingsource.add(builder);
          commonspec.getElasticSearchClient().createMapping(indexName, mappingName, mappingsource);
      }
docs: Index a document within a mapping type.
  
  @param indexName
  @param mappingName
  @param key
  @param value
  @throws Exception