protected void testXml(CacheCreation creation, boolean checkSame) throws IOException {
    File root = temporaryFolder.getRoot();
    File dir = new File(root, "XML_" + getGemFireVersion());
    dir.mkdirs();
    File file = new File(dir, getUniqueName() + ".xml");

    final boolean useSchema = getUseSchema();
    final String version = getGemFireVersion();

    PrintWriter pw = new PrintWriter(new FileWriter(file), true);
    CacheXmlGenerator.generate(creation, pw, useSchema, version);
    pw.close();

    setXmlFile(file);

    boolean client = creation instanceof ClientCacheCreation;
    Cache cache = getCache(client);

    try {
      if (checkSame && !creation.sameAs(cache)) {
        StringWriter sw = new StringWriter();
        CacheXmlGenerator.generate(creation, new PrintWriter(sw, true), useSchema, version);
        CacheXmlGenerator.generate(cache, new PrintWriter(sw, true), useSchema, version);
        fail(sw.toString());
      }
    } catch (RuntimeException re) {
      StringWriter sw = new StringWriter();
      CacheXmlGenerator.generate(creation, new PrintWriter(sw, true), useSchema, version);
      CacheXmlGenerator.generate(cache, new PrintWriter(sw, true), useSchema, version);
      fail(sw.toString(), re);
    }
  }
Uses the {@link CacheXmlGenerator} to generate an XML file from the given
{@link CacheCreation}. It then creates a {@link Cache} from the XML and asserts that it is the
same as the cache described in the <code>CacheCreation</code>.

@param creation the {@link CacheCreation} from which to generate an XML file
@throws IOException if an exception is encountered when writing the XML file
geode-dunit/src/main/java/org/apache/geode/cache30/CacheXmlTestCase.java