@Test public void testGetContainersByTemplate() { when(kieServerInstanceManager.getContainers(any(), any())).thenReturn(singletonList(container)); org.kie.server.controller.api.model.runtime.ServerInstanceKey instanceKey = new ServerInstanceKey("instanceId", "test server", serverTemplate.getId(), "http: serverTemplate.addServerInstance(instanceKey); specManagementService.saveServerTemplate(serverTemplate); ContainerList containers = runtimeManagementService.getContainers(serverTemplate, containerSpec); assertNotNull(containers); assertEquals(1, containers.getContainers().length); assertEquals(container, containers.getContainers()[0]); verify(kieServerInstanceManager).getContainers(any(), any()); }
@Override public ContainerList getContainers(final ServerTemplate serverTemplate, final ContainerSpec containerSpec) { return getServerTemplateContainers(serverTemplate.getId(), containerSpec.getId()); }
RuntimeManagementServiceImpl implements RuntimeManagementService { @Override public ContainerList getContainers(final ServerTemplate serverTemplate, final ContainerSpec containerSpec) { return getServerTemplateContainers(serverTemplate.getId(), containerSpec.getId()); } }
RuntimeManagementServiceImpl implements RuntimeManagementService { @Override public ContainerList getContainers(final ServerTemplate serverTemplate, final ContainerSpec containerSpec) { return getServerTemplateContainers(serverTemplate.getId(), containerSpec.getId()); }  }
RuntimeManagementServiceImpl implements RuntimeManagementService { @Override public ContainerList getContainers(final ServerTemplate serverTemplate, final ContainerSpec containerSpec) { return getServerTemplateContainers(serverTemplate.getId(), containerSpec.getId()); }  @Override ServerInstanceKeyList getServerInstances(final String serverTemplateId); @Override ContainerList getContainers(final ServerTemplate serverTemplate,
                                       final ContainerSpec containerSpec); ContainerList getServerTemplateContainers(final String serverTemplateId,
                                                        final String containerSpecId); ContainerList getServerInstanceContainers(final String serverTemplateId,
                                                        final String serverInstanceId); @Override ContainerList getContainers(ServerInstanceKey serverInstanceKey); KieServerTemplateStorage getTemplateStorage(); void setTemplateStorage(KieServerTemplateStorage templateStorage); KieServerInstanceManager getKieServerInstanceManager(); void setKieServerInstanceManager(KieServerInstanceManager kieServerInstanceManager); }
RuntimeManagementServiceImpl implements RuntimeManagementService { @Override public ContainerList getContainers(final ServerTemplate serverTemplate, final ContainerSpec containerSpec) { return getServerTemplateContainers(serverTemplate.getId(), containerSpec.getId()); }  @Override ServerInstanceKeyList getServerInstances(final String serverTemplateId); @Override ContainerList getContainers(final ServerTemplate serverTemplate,
                                       final ContainerSpec containerSpec); ContainerList getServerTemplateContainers(final String serverTemplateId,
                                                        final String containerSpecId); ContainerList getServerInstanceContainers(final String serverTemplateId,
                                                        final String serverInstanceId); @Override ContainerList getContainers(ServerInstanceKey serverInstanceKey); KieServerTemplateStorage getTemplateStorage(); void setTemplateStorage(KieServerTemplateStorage templateStorage); KieServerInstanceManager getKieServerInstanceManager(); void setKieServerInstanceManager(KieServerInstanceManager kieServerInstanceManager);  }