code: public JShellTool rawTool() {
          if (prefs == null) {
              prefs = new PreferencesStorage(Preferences.userRoot().node(PREFERENCES_NODE));
          }
          if (vars == null) {
              vars = System.getenv();
          }
          JShellTool sh = new JShellTool(cmdIn, cmdOut, cmdErr, console, userIn,
                  userOut, userErr, prefs, vars, locale);
          sh.testPrompt = capturePrompt;
          return sh;
      }
docs: Create a tool instance for testing. Not in JavaShellToolBuilder.
  
  @return the tool instance