DockerCloudClientFactory implements CloudClientFactory { @Override public final boolean canBeAgentOfType(@Nonnull AgentDescription description) { return DockerCloudUtils.getClientId(description) != null; } DockerCloudClientFactory(
            @Nonnull DockerCloudSupport cloudSupport,
            @Nonnull DockerCloudSupportRegistry cloudSupportRegistry,
            @Nonnull final SBuildServer buildServer,
            @Nonnull final PluginDescriptor pluginDescriptor); @Nonnull @Override final CloudClientEx createNewClient(@Nonnull CloudState state, @Nonnull CloudClientParameters params); @Nonnull @Override final Map<String, String> getInitialParameterValues(); @NotNull @Override String getCloudCode(); @NotNull @Override String getDisplayName(); @Nonnull @Override final String getEditProfileUrl(); @Nonnull @Override final jetbrains.buildServer.serverSide.PropertiesProcessor getPropertiesProcessor(); @Override final boolean canBeAgentOfType(@Nonnull AgentDescription description);  }
@Test public void canBeAgentOfType() { DockerCloudClientFactory fty = createFactory(); assertThat(fty.canBeAgentOfType(new TestSBuildAgent())).isFalse(); assertThat(fty.canBeAgentOfType(new TestSBuildAgent().environmentVariable(DockerCloudUtils.ENV_CLIENT_ID, TestUtils.TEST_UUID.toString()))); }