public TestInfo getTestRunStatus(String userKey, String testId, boolean detailed) {
        TestInfo ti = BmTestManager.getInstance().getTestInfo();

        if (userKey == null || userKey.trim().isEmpty()) {
            BmLog.debug("TestRunStatus cannot be received, userKey is empty");
            ti.setStatus(TestStatus.NotFound);
            return ti;
        }

        if (testId == null || testId.trim().isEmpty()) {
            BmLog.debug("TestRunStatus cannot be received, testId is empty");
            ti.setStatus(TestStatus.NotFound);
            return ti;
        }

        try {
            String url = this.urlManager.testStatus(Constants.APP_KEY, userKey, testId, detailed);

            JSONObject jo = getJson(Methods.POST, url, null);
            if (jo.getInt("response_code") == 200) {
                ti = TestInfoProcessor.parseTestInfo(jo);
            } else {
                ti.setStatus(jo.getInt("response_code") == 404 ? TestStatus.NotFound : TestStatus.Error);
                ti.setError(jo.getString("error"));
            }
        } catch (JSONException e) {
            BmLog.error("Error getting status: " + e);
            ti.setStatus(TestStatus.Error);
        } catch (Throwable e) {
            BmLog.error("Error getting status: " + e);
            ti.setStatus(TestStatus.Error);
        }

        return ti;
    }