DefaultDockerCloudClient extends BuildServerAdapter implements DockerCloudClient { @Nonnull @Override public UUID getUuid() { return uuid; } DefaultDockerCloudClient(@Nonnull DockerCloudClientConfig clientConfig,
                             @Nonnull final List<DockerImageConfig> imageConfigs,
                             @Nonnull final DockerImageNameResolver resolver,
                             @Nonnull CloudState cloudState,
                             @Nonnull final SBuildServer buildServer); @Nonnull @Override UUID getUuid(); @Nonnull @Override DockerCloudSupport getCloudSupport(); @Override void serverStartup(); @Override boolean isInitialized(); @Nullable @Override DockerImage findImageById(@Nonnull String id); @Nullable @Override DockerInstance findInstanceByAgent(@Nonnull AgentDescription agent); @Nonnull @Override Collection<DockerImage> getImages(); @Nullable @Override CloudErrorInfo getErrorInfo(); @Override boolean canStartNewInstance(@Nonnull CloudImage image); @Nullable @Override String generateAgentName(@Nonnull AgentDescription agent); @Nonnull @Override DockerInstance startNewInstance(@Nonnull final CloudImage image, @Nonnull final CloudInstanceUserData tag); @Override void restartInstance(@Nonnull final CloudInstance instance); @Override void terminateInstance(@Nonnull final CloudInstance instance); @Override void dispose(); Optional<Instant> getLastDockerSyncTime(); @Override void notifyFailure(@Nonnull String msg, @Nullable Throwable throwable);  }
@Test public void mustDestroyContainerWithUnknownInstanceId() { DefaultDockerCloudClient client = createClient(); waitForImage(client); TestDockerClientFacade clientFacade = testCloudSupport.getClientFacade(); clientFacade.agentHolder(new AgentHolder(). label(DockerCloudUtils.CLIENT_ID_LABEL, client.getUuid().toString()). label(DockerCloudUtils.INSTANCE_ID_LABEL, TestUtils.TEST_UUID.toString())); waitUntilNextSync(client); assertThat(clientFacade.getAgentHolders()).isEmpty(); }