private JSONObject getLifeCycleState(String assetId, String assetType) throws JSONException {
   Map<String, String> assetTypeParamMap = new HashMap<String, String>();
   assetTypeParamMap.put("type", assetType);
   assetTypeParamMap.put("lifecycle", lifeCycleName);
   ClientResponse response =
       genericRestClient.geneticRestRequestGet(
           publisherUrl + "/asset/" + assetId + "/state", queryParamMap, headerMap, cookieHeader);
   return new JSONObject(response.getEntity(String.class));
 }
  @Test(
      groups = {"wso2.greg", "wso2.greg.es"},
      description = "Getting ratings added using rest api",
      dependsOnMethods = "addRatings")
  public void getRatings() throws JSONException, IOException, InterruptedException {

    queryParamMap.clear();

    queryParamMap.put("path", path);

    ClientResponse response =
        genericRestClient.geneticRestRequestGet(
            registryAPIUrl + generalPath + "/rating", queryParamMap, headerMap, null);

    assertTrue(
        (response.getStatusCode() == Response.Status.OK.getStatusCode()),
        "Wrong status code ,Expected 200 OK ,Received " + response.getStatusCode());

    assertTrue(response.getEntity(String.class).equals("{\"average\":4.0,\"myRating\":4}"));
  }