### Question:
KafkaKubernetesCloud extends Cloud { @Override public Collection<PlannedNode> provision(Label label, int excessWorkload) { Set<String> allInProvisioning = getNodesInProvisioning(label); LOGGER.info("In provisioning : " + allInProvisioning); int toBeProvisioned = Math.max(0, excessWorkload - allInProvisioning.size()); LOGGER.info("Excess workload after pending Kubernetes agents: " + toBeProvisioned); List<PlannedNode> provisionNodes = new ArrayList<>(); for (int i = 0; i < toBeProvisioned; i++) { PlannedNode node = new PlannedNode(name, Computer.threadPoolForRemoting.submit(() -> new KafkaCloudSlave(this)), AGENT_NUM_EXECUTORS); provisionNodes.add(node); } return provisionNodes; } @DataBoundConstructor  KafkaKubernetesCloud(String name); String getServerUrl(); @DataBoundSetter void setServerUrl(String serverUrl); String getServerCertificate(); @DataBoundSetter void setServerCertificate(String serverCertificate); String getCredentialsId(); @DataBoundSetter void setCredentialsId(String credentialsId); boolean isSkipTlsVerify(); @DataBoundSetter void setSkipTlsVerify(boolean skipTlsVerify); String getNamespace(); @DataBoundSetter void setNamespace(String namespace); String getJenkinsUrl(); @DataBoundSetter void setJenkinsUrl(String jenkinsUrl); String getContainerImage(); @DataBoundSetter void setContainerImage(String containerImage); String getIdleMinutes(); @DataBoundSetter void setIdleMinutes(String idleMinutes); String getLabel(); @DataBoundSetter void setLabel(String label); Node.Mode getNodeUsageMode(); @DataBoundSetter void setNodeUsageMode(Node.Mode nodeUsageMode); String getDescription(); @DataBoundSetter void setDescription(String description); String getWorkingDir(); @DataBoundSetter void setWorkingDir(String workingDir); List<? extends NodeProperty<?>> getNodeProperties(); @DataBoundSetter void setNodeProperties(List<? extends NodeProperty<?>> nodeProperties); String getKafkaUsername(); @DataBoundSetter void setKafkaUsername(String kafkaUsername); String getSslTruststoreLocation(); @DataBoundSetter void setSslTruststoreLocation(String sslTruststoreLocation); String getSslKeystoreLocation(); @DataBoundSetter void setSslKeystoreLocation(String sslKeystoreLocation); boolean isEnableSSL(); @DataBoundSetter void setEnableSSL(boolean enableSSL); Set<LabelAtom> getLabelSet(); KubernetesClient connect(); @Override Collection<PlannedNode> provision(Label label, int excessWorkload); Set<String> getNodesInProvisioning(@CheckForNull Label label); @Override boolean canProvision(@CheckForNull Label label); static final int AGENT_NUM_EXECUTORS; }### Answer:
@Test public void testProvisionWorkloadSize() { KafkaKubernetesCloud cloud = new KafkaKubernetesCloud("kafka-kubernetes"); Collection<NodeProvisioner.PlannedNode> nodes = cloud.provision(new LabelAtom("test"), 200); assertThat(nodes, hasSize(200)); }