@Test
  public void testCreateBundle() throws Exception {
    File homeJDK = new File(System.getProperty("java.home")).getParentFile();

    if (!new File(homeJDK, "lib/tools.jar").exists()) return; // Skip pure jre

    File bootJDK = SystemInfo.isMac ? homeJDK.getParentFile().getParentFile() : homeJDK;
    String verStr = System.getProperty("java.version");

    boolean macNonStandardJDK = SystemInfo.isMac && !new File(bootJDK, "Contents/Home").exists();
    JdkBundle bundle =
        macNonStandardJDK
            ? JdkBundle.createBundle(homeJDK, "", true, false, true)
            : // the test is run under jdk with non-standard layout
            JdkBundle.createBundle(bootJDK, true, false);

    assertNotNull(bundle);

    assertTrue(bundle.isBoot());
    assertFalse(bundle.isBundled());

    assertTrue(
        FileUtil.filesEqual(bundle.getAbsoluteLocation(), macNonStandardJDK ? homeJDK : bootJDK));
    Pair<Version, Integer> verUpdate = bundle.getVersionUpdate();

    assertNotNull(verUpdate);

    final String evalVerStr = verUpdate.first.toString() + "_" + verUpdate.second.toString();
    assertTrue(evalVerStr + " is not the same with " + verStr, verStr.contains(evalVerStr));
  }