code: public int getNumberOfTCRunningForSubAccount(String user) {
          LOGGER.entering(user);
          int tcRunning = -1;
          try {
              SauceLabsHttpResponse result = doSauceRequest("/activity");
              JsonObject obj = result.getEntityAsJsonObject();
              tcRunning = obj.getAsJsonObject("subaccounts").getAsJsonObject(user).get("all").getAsInt();
          } catch (JsonSyntaxException | IllegalStateException | IOException e) {
              LOGGER.log(Level.SEVERE, "Unable to get number of test cases running for sub-account.", e);
          }
          LOGGER.exiting(tcRunning);
          return tcRunning;
      }
docs: Get the number of test cases running in sauce labs for the sauce labs sub-account/user
  
  @param user
  id of the sub-account
  @return number of test case running or <code>-1</code> on failure