protected static void doLogout() throws Exception {
    System.out
        .println("BaseServiceTest ::  Executing doLogout with user : admin, password : admin.");
    if (httpclient != null) {
      CloseableHttpResponse logoutResponse = null;
      try {
        HttpUriRequest logout = RequestBuilder.get().setUri(new URI(LOGOUT_URL)).build();
        logoutResponse = httpclient.execute(logout);
        try {
          HttpEntity entity = logoutResponse.getEntity();
          EntityUtils.consume(entity);
        } finally {
          if (logoutResponse != null) {
            logoutResponse.close();
          }
          httpclient.close();
          httpclient = null;
        }
      } catch (Exception failed) {
        logException(failed);
        throw failed;
      }
      System.out.println("BaseServiceTest ::  Executed doLogout");
    } else {
      System.out.println("BaseServiceTest ::  User NOT logged-in");
    }
  }
Logout to pulse server and close httpClient To be called from setupAfterClass in each test
class
geode-pulse/src/uiTest/java/org/apache/geode/tools/pulse/tests/junit/BaseServiceTest.java