private boolean createCacheOnVM(final VM vm, final String cacheXml) {
    return (Boolean) vm.invoke(new SerializableCallable() {
      @Override
      public Object call() throws Exception {
        try {
          disconnectFromDS();
          Properties props = new Properties();
          props.setProperty(CACHE_XML_FILE, cacheXml);
          LogWriterUtils.getLogWriter()
              .info("<ExpectedException action=add>ClassNotFoundException</ExpectedException>");
          getSystem(props);
          assertNotNull(getCache());
          return Boolean.TRUE;
        } catch (Exception e) {
          LogWriterUtils.getLogWriter().error("Could not create the cache", e);
          return Boolean.FALSE;
        } finally {
          LogWriterUtils.getLogWriter()
              .info("<ExpectedException action=remove>ClassNotFoundException</ExpectedException>");
        }
      }
    });
  }
Creates a new Cache for a given VM using a cache.xml.

@param vm a peer.
@param cacheXml a declaritive xml file.
@return true if the cache was created, false otherwise.
geode-core/src/distributedTest/java/org/apache/geode/internal/compression/CompressionCacheConfigDUnitTest.java