public boolean managementUnsubscribe(String path)
      throws RegistryException, RegistryExceptionException, RemoteException {

    String sessionID = sessionCookie;
    SubscriptionBean sBean = infoServiceAdminClient.getSubscriptions(path, sessionID);
    infoServiceAdminClient.unsubscribe(
        path, sBean.getSubscriptionInstances()[0].getId(), sessionID);
    sBean = infoServiceAdminClient.getSubscriptions(path, sessionID);
    return (sBean.getSubscriptionInstances() == null);
  }
 private boolean consoleSubscribe(String path, String eventType)
     throws RemoteException, RegistryException {
   // subscribe for management console notifications
   SubscriptionBean bean =
       infoServiceAdminClient.subscribe(
           path, "work://RoleSubscriptionTest", eventType, sessionCookie);
   return bean.getSubscriptionInstances() != null;
 }
  @Test(groups = "wso2.greg", description = "tags Verification", dependsOnMethods = "testAddPolicy")
  public void testTagsVerification()
      throws AxisFault, GovernanceException, RegistryException, RegistryExceptionException {

    final String policyPath = "/_system/governance" + policy.getPath();

    infoServiceAdminclient.addTag("my tag", policyPath, sessionCookie);
    TagBean tagBean = infoServiceAdminclient.getTags(policyPath, sessionCookie);

    Tag[] tags = tagBean.getTags();
    boolean status = false;
    for (Tag tmpTag : tags) {
      if (tmpTag.getTagName().contentEquals("my tag")) {
        status = true;
      }
    }
    assertTrue(status, "verifying the tag creation");
  }