private static boolean isServerUp() throws IOException {
        String apiPath = "/api/v1/stacks";

        String apiUrl = String.format(SERVER_URL_FORMAT, serverPort) + apiPath;
        CloseableHttpClient httpClient = HttpClients.createDefault();;

        try {
            HttpGet httpGet = new HttpGet(apiUrl);
            httpGet.addHeader("Authorization", getBasicAdminAuthentication());
            httpGet.addHeader("X-Requested-By", "ambari");
            HttpResponse httpResponse = httpClient.execute(httpGet);
            int statusCode = httpResponse.getStatusLine().getStatusCode();
            HttpEntity entity = httpResponse.getEntity();
            String responseBody = entity != null ? EntityUtils.toString(entity) : null;

            return true;
        } catch (IOException ex) {

        } finally {
            httpClient.close();
        }

        return false;
    }
Attempt to query the server for the stack. If the server is up,
we will get a response. If not, an exception will be thrown.

@return - True if the local server is responsive to queries.
          False, otherwise.
ambari-funtest/src/test/java/org/apache/ambari/funtest/server/tests/ServerTestBase.java