### Question:
JobHelper { static boolean creatingServers(DomainPresenceInfo info) { Domain dom = info.getDomain(); DomainSpec spec = dom.getSpec(); List<Cluster> clusters = spec.getClusters(); List<ManagedServer> servers = spec.getManagedServers(); for (Cluster cluster : clusters) { int replicaCount = dom.getReplicaCount(cluster.getClusterName()); String clusterServerStartPolicy = cluster.getServerStartPolicy(); LOGGER.fine( "Start Policy: " + clusterServerStartPolicy + ", replicaCount: " + replicaCount + " for cluster: " + cluster); if ((clusterServerStartPolicy == null || !clusterServerStartPolicy.equals(ConfigurationConstants.START_NEVER)) && replicaCount > 0) { return true; } } String domainServerStartPolicy = dom.getSpec().getServerStartPolicy(); if (domainServerStartPolicy == null || !domainServerStartPolicy.equals(ConfigurationConstants.START_NEVER)) { return true; } for (ManagedServer server : servers) { String serverStartPolicy = server.getServerStartPolicy(); if (serverStartPolicy == null || !serverStartPolicy.equals(ConfigurationConstants.START_NEVER)) { return true; } } return false; } private  JobHelper(); static Step createDomainIntrospectorJobStep(Step next); static Step deleteDomainIntrospectorJobStep(Step next);  }### Answer:
@Test public void creatingServers_true_whenClusterReplicas_gt_0() { configureCluster("cluster1").withReplicas(1); assertThat(JobHelper.creatingServers(domainPresenceInfo), equalTo(true)); }
@Test public void creatingServers_false_whenClusterReplicas_is_0() { configureCluster("cluster1").withReplicas(0); assertThat(JobHelper.creatingServers(domainPresenceInfo), equalTo(false)); }
@Test public void creatingServers_true_whenDomainReplicas_gt_0_and_cluster_has_no_replicas() { configureDomain().withDefaultReplicaCount(1); configureCluster("cluster1"); assertThat(JobHelper.creatingServers(domainPresenceInfo), equalTo(true)); }
@Test public void creatingServers_false_whenDomainReplicas_is_0_and_cluster_has_no_replicas() { configureDomain().withDefaultReplicaCount(0); configureCluster("cluster1"); assertThat(JobHelper.creatingServers(domainPresenceInfo), equalTo(false)); }
@Test public void creatingServers_false_when_no_domain_nor_cluster_replicas() { configureCluster("cluster1"); assertThat(JobHelper.creatingServers(domainPresenceInfo), equalTo(false)); }
@Test public void creatingServers_false_when_noCluster_and_Start_Never_startPolicy() { assertThat(JobHelper.creatingServers(domainPresenceInfo), equalTo(false)); }
@Test public void creatingServers_true_when_noCluster_and_Start_If_Needed_startPolicy() { configureDomain() .withDefaultServerStartPolicy(ConfigurationConstants.START_IF_NEEDED); assertThat(JobHelper.creatingServers(domainPresenceInfo), equalTo(true)); }
@Test public void creatingServers_true_when_noCluster_and_Start_Always_startPolicy() { configureDomain() .withDefaultServerStartPolicy(ConfigurationConstants.START_ALWAYS); assertThat(JobHelper.creatingServers(domainPresenceInfo), equalTo(true)); }
@Test public void creatingServers_false_when_server_with_Start_Never_startPolicy() { configureServer("managed-server1") .withServerStartPolicy(ConfigurationConstants.START_NEVER); assertThat(JobHelper.creatingServers(domainPresenceInfo), equalTo(false)); }
@Test public void creatingServers_true_when_server_with_Start_If_Needed_startPolicy() { configureServer("managed-server1") .withServerStartPolicy(ConfigurationConstants.START_IF_NEEDED); assertThat(JobHelper.creatingServers(domainPresenceInfo), equalTo(true)); }
@Test public void creatingServers_true_when_server_with_Start_Always_startPolicy() { configureServer("managed-server1") .withServerStartPolicy(ConfigurationConstants.START_ALWAYS); assertThat(JobHelper.creatingServers(domainPresenceInfo), equalTo(true)); }