ReplicaSetHandler { ReplicaSetHandler(PodTemplateHandler podTemplateHandler) { this.podTemplateHandler = podTemplateHandler; } ReplicaSetHandler(PodTemplateHandler podTemplateHandler); ReplicaSet getReplicaSet(ResourceConfig config,
                                    List<ImageConfiguration> images);  }
@Test public void replicaSetHandlerTest() { ContainerHandler containerHandler = getContainerHandler(); PodTemplateHandler podTemplateHandler = new PodTemplateHandler(containerHandler); ReplicaSetHandler replicaSetHandler = new ReplicaSetHandler(podTemplateHandler); ResourceConfig config = new ResourceConfig.Builder() .imagePullPolicy("IfNotPresent") .controllerName("testing") .withServiceAccount("test-account") .withReplicas(5) .volumes(volumes1) .build(); ReplicaSet replicaSet = replicaSetHandler.getReplicaSet(config,images); assertNotNull(replicaSet.getSpec()); assertNotNull(replicaSet.getMetadata()); assertEquals(5,replicaSet.getSpec().getReplicas().intValue()); assertNotNull(replicaSet.getSpec().getTemplate()); assertEquals("testing",replicaSet.getMetadata().getName()); assertEquals("test-account",replicaSet.getSpec().getTemplate() .getSpec().getServiceAccountName()); assertFalse(replicaSet.getSpec().getTemplate().getSpec().getVolumes().isEmpty()); assertEquals("test",replicaSet.getSpec().getTemplate().getSpec(). getVolumes().get(0).getName()); assertEquals("/test/path",replicaSet.getSpec().getTemplate() .getSpec().getVolumes().get(0).getHostPath().getPath()); assertNotNull(replicaSet.getSpec().getTemplate().getSpec().getContainers()); }