private void testStateStuckInProvisioning(boolean isSystemContainerMissingOnHost) throws Throwable { String systemContainerId = extractId(systemContainerLink); addContainerToMockAdapter(COMPUTE_HOST_LINK, systemContainerId, SystemContainerDescriptions.AGENT_CONTAINER_NAME, image, computeState.tenantLinks); startAndWaitHostContainerListDataCollection(); waitForContainer(systemContainerLink, image, PowerState.RUNNING, "System container state should be running after regular data collection."); ContainerState cs = new ContainerState(); cs.powerState = PowerState.PROVISIONING; doPatch(cs, systemContainerLink); waitForContainer(systemContainerLink, image, PowerState.PROVISIONING, "System container state should be provisioning after patching it to provisioning."); startAndWaitHostContainerListDataCollection(); waitForContainer(systemContainerLink, image, PowerState.RUNNING, "System container state should be running after the second data collection when the" + " state was provisioning."); }