public XmlEntityBuilder withConfig(final Document document) throws XPathExpressionException,
        TransformerFactoryConfigurationError, TransformerException {
      xmlEntity.xmlDefinition = xmlEntity.loadXmlDefinition(document);

      return this;
    }
Sets a config xml document source to get the entity XML Definition from as returned by
{@link XmlEntity#getXmlDefinition()}. Defaults to current active configuration for
{@link Cache}.

<b>Should only be used for testing.</b>

@param document Config XML {@link Document}.
@return this XmlEntityBuilder
@since GemFire 8.1
geode-core/src/main/java/org/apache/geode/management/internal/configuration/domain/XmlEntity.java