### Question:
SpecManagementServiceImpl implements SpecManagementService { @Override public ServerTemplateList listServerTemplates() { return new ServerTemplateList(templateStorage.load()); }  @Override synchronized void saveContainerSpec(String serverTemplateId,
                                               ContainerSpec containerSpec); @Override synchronized void updateContainerSpec(String serverTemplateId, ContainerSpec containerSpec); @Override synchronized void updateContainerSpec(final String serverTemplateId, final String containerId, final ContainerSpec containerSpec); @Override synchronized void updateContainerSpec(String serverTemplateId, String containerId, ContainerSpec containerSpec, Boolean resetBeforeUpdate); @Override synchronized void saveServerTemplate(ServerTemplate serverTemplate); @Override ServerTemplate getServerTemplate(String serverTemplateId); @Override ServerTemplateKeyList listServerTemplateKeys(); @Override ServerTemplateList listServerTemplates(); @Override ContainerSpecList listContainerSpec(String serverTemplateId); @Override ContainerSpec getContainerInfo(String serverTemplateId,
                                          String containerId); @Override synchronized void deleteContainerSpec(String serverTemplateId,
                                                 String containerSpecId); @Override synchronized void deleteServerTemplate(String serverTemplateId); @Override synchronized void copyServerTemplate(String serverTemplateId,
                                                String newServerTemplateId,
                                                String newServerTemplateName); @Override synchronized void updateContainerConfig(final String serverTemplateId,
                                                   final String containerSpecId,
                                                   final Capability capability,
                                                   final ContainerConfig containerConfig); @Override synchronized void updateServerTemplateConfig(String serverTemplateId,
                                                        Capability capability,
                                                        ServerConfig serverTemplateConfig); @Override synchronized void startContainer(ContainerSpecKey containerSpecKey); @Override synchronized void stopContainer(ContainerSpecKey containerSpecKey); @Override synchronized void activateContainer(ContainerSpecKey containerSpecKey); @Override synchronized void deactivateContainer(ContainerSpecKey containerSpecKey); @Override void deleteServerInstance(final ServerInstanceKey serverInstanceKey); KieServerTemplateStorage getTemplateStorage(); void setTemplateStorage(KieServerTemplateStorage templateStorage); NotificationService getNotificationService(); void setNotificationService(NotificationService notificationService); KieServerInstanceManager getKieServerInstanceManager(); void setKieServerInstanceManager(KieServerInstanceManager kieServerInstanceManager);  }### Answer:
@Test public void testListServerTemplates() { int limit = getRandomInt(5, 10); for (int x = 0; x < limit; x++) { ServerTemplate serverTemplate = new ServerTemplate(); serverTemplate.setName("test server " + x); serverTemplate.setId(UUID.randomUUID().toString()); specManagementService.saveServerTemplate(serverTemplate); } ServerTemplateKeyList existing = specManagementService.listServerTemplateKeys(); assertNotNull(existing); assertEquals(limit, existing.getServerTemplates().length); ServerTemplateList allTemplates = specManagementService.listServerTemplates(); assertNotNull(allTemplates); assertEquals(limit, allTemplates.getServerTemplates().length); }