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