public static String init(String className) throws Exception {
    DistributedSystem ds;
    Properties props = new Properties();
    String jtest = System.getProperty("JTESTS");
    int pid = OSProcess.getId();
    String path = File.createTempFile("dunit-cachejta_", ".xml").getAbsolutePath();
    LogWriterUtils.getLogWriter().fine("PATH " + path);
    /** * Return file as string and then modify the string accordingly ** */
    String file_as_str = readFile(
        createTempFileFromResource(CacheUtils.class, "cachejta.xml")
            .getAbsolutePath());
    file_as_str = file_as_str.replaceAll("newDB", "newDB_" + pid);
    String modified_file_str = modifyFile(file_as_str);
    String modified_file_str1 = modifyFile1(modified_file_str);
    FileOutputStream fos = new FileOutputStream(path);
    BufferedWriter wr = new BufferedWriter(new OutputStreamWriter(fos));
    wr.write(modified_file_str1);
    wr.flush();
    wr.close();
    props.setProperty(CACHE_XML_FILE, path);
    String tableName = "";

    ds = (new TxnManagerMultiThreadDUnitTest()).getSystem(props);
    CacheUtils.ds = ds;
    cache = CacheFactory.create(ds);
    if (className != null && !className.equals("")) {
      String time = new Long(System.currentTimeMillis()).toString();
      tableName = className + time;
      createTable(tableName);
    }

    return tableName;
  }
This test case is to test the following test scenarios: 1) Behaviour of Transaction Manager in
multithreaded transactions. We will have around five threads doing different activities. The
response to those activities by transaction manager is tested.
geode-core/src/distributedTest/java/org/apache/geode/internal/jta/dunit/TxnManagerMultiThreadDUnitTest.java