Program: 114853
Project: 114853
Buggy source:
@Test(groups={"String_Node_Str"},description="String_Node_Str",dependsOnMethods="String_Node_Str") public void testLCStateChengeVisibility() throws Exception {
  HttpResponse resp=apiPublisherClientUser1.getAPIInformationPage(API_NAME,providerName,API_VERSION_2_0_0);
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  APILifeCycleStateRequest updateRequest=new APILifeCycleStateRequest(API_NAME,providerName,APILifeCycleState.PUBLISHED);
  updateRequest.setVersion(API_VERSION_2_0_0);
  apiPublisherClientUser1.changeAPILifeCycleStatus(updateRequest);
  waitForAPIDeploymentSync(user.getUserName(),API_NAME,API_VERSION_2_0_0,APIMIntegrationConstants.IS_API_EXISTS);
  resp=apiPublisherClientUser1.getAPIInformationPage(API_NAME,providerName,API_VERSION_2_0_0);
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  updateRequest=new APILifeCycleStateRequest(API_NAME,providerName,APILifeCycleState.BLOCKED);
  updateRequest.setVersion(API_VERSION_2_0_0);
  apiPublisherClientUser1.changeAPILifeCycleStatus(updateRequest);
  waitForAPIDeployment();
  resp=apiPublisherClientUser1.getAPIInformationPage(API_NAME,providerName,API_VERSION_2_0_0);
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  updateRequest=new APILifeCycleStateRequest(API_NAME,providerName,APILifeCycleState.DEPRECATED);
  updateRequest.setVersion(API_VERSION_2_0_0);
  apiPublisherClientUser1.changeAPILifeCycleStatus(updateRequest);
  waitForAPIDeploymentSync(user.getUserName(),API_NAME,API_VERSION_2_0_0,APIMIntegrationConstants.IS_API_NOT_EXISTS);
  resp=apiPublisherClientUser1.getAPIInformationPage(API_NAME,providerName,API_VERSION_2_0_0);
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
}

Fixed version (ground truth):
@Test(groups={"String_Node_Str"},description="String_Node_Str",dependsOnMethods="String_Node_Str") public void testLCStateChengeVisibility() throws Exception {
  HttpResponse resp=apiPublisherClientUser1.getAPIInformationPage(API_NAME,providerName,API_VERSION_2_0_0);
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  APILifeCycleStateRequest updateRequest=new APILifeCycleStateRequest(API_NAME,providerName,APILifeCycleState.PUBLISHED);
  updateRequest.setVersion(API_VERSION_2_0_0);
  apiPublisherClientUser1.changeAPILifeCycleStatus(updateRequest);
  waitForAPIDeploymentSync(user.getUserName(),API_NAME,API_VERSION_2_0_0,APIMIntegrationConstants.IS_API_EXISTS);
  resp=apiPublisherClientUser1.getAPIInformationPage(API_NAME,providerName,API_VERSION_2_0_0);
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  updateRequest=new APILifeCycleStateRequest(API_NAME,providerName,APILifeCycleState.BLOCKED);
  updateRequest.setVersion(API_VERSION_2_0_0);
  apiPublisherClientUser1.changeAPILifeCycleStatus(updateRequest);
  waitForAPIDeployment();
  resp=apiPublisherClientUser1.getAPIInformationPage(API_NAME,providerName,API_VERSION_2_0_0);
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  updateRequest=new APILifeCycleStateRequest(API_NAME,providerName,APILifeCycleState.DEPRECATED);
  updateRequest.setVersion(API_VERSION_2_0_0);
  apiPublisherClientUser1.changeAPILifeCycleStatus(updateRequest);
  waitForAPIDeployment();
  resp=apiPublisherClientUser1.getAPIInformationPage(API_NAME,providerName,API_VERSION_2_0_0);
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
  assertEquals(resp.getData().contains("String_Node_Str"),true,"String_Node_Str");
}