@Test public void getConfiguredTimestampingServices() { List<TspType> configuredTimestampingServices = new ArrayList<>(); configuredTimestampingServices.add(TestUtils.createTspType("https: configuredTimestampingServices.add(TestUtils.createTspType("https: configuredTimestampingServices.add(TestUtils.createTspType("https: when(serverConfRepository.getServerConf()).thenReturn(serverConfType); when(serverConfType.getTsp()).thenReturn(configuredTimestampingServices); List<TspType> tsp = serverConfService.getConfiguredTimestampingServices(); assertEquals(configuredTimestampingServices.size(), tsp.size()); assertEquals("TSA 1", tsp.get(2).getName()); assertEquals("TSA 2", tsp.get(1).getName()); assertEquals("TSA 3", tsp.get(0).getName()); }
public List<TspType> getConfiguredTimestampingServices() { ServerConfType serverConfType = serverConfRepository.getServerConf(); List<TspType> tsp = serverConfType.getTsp(); Hibernate.initialize(tsp); return tsp; }
ServerConfService { public List<TspType> getConfiguredTimestampingServices() { ServerConfType serverConfType = serverConfRepository.getServerConf(); List<TspType> tsp = serverConfType.getTsp(); Hibernate.initialize(tsp); return tsp; } }
ServerConfService { public List<TspType> getConfiguredTimestampingServices() { ServerConfType serverConfType = serverConfRepository.getServerConf(); List<TspType> tsp = serverConfType.getTsp(); Hibernate.initialize(tsp); return tsp; } @Autowired  ServerConfService(ServerConfRepository serverConfRepository); }
ServerConfService { public List<TspType> getConfiguredTimestampingServices() { ServerConfType serverConfType = serverConfRepository.getServerConf(); List<TspType> tsp = serverConfType.getTsp(); Hibernate.initialize(tsp); return tsp; } @Autowired  ServerConfService(ServerConfRepository serverConfRepository); ServerConfType getServerConf(); ServerConfType getOrCreateServerConf(); SecurityServerId getSecurityServerId(); ClientId getSecurityServerOwnerId(); List<TspType> getConfiguredTimestampingServices(); boolean isServerCodeInitialized(); boolean isServerOwnerInitialized(); ServerConfType saveOrUpdate(ServerConfType serverConfType); }
ServerConfService { public List<TspType> getConfiguredTimestampingServices() { ServerConfType serverConfType = serverConfRepository.getServerConf(); List<TspType> tsp = serverConfType.getTsp(); Hibernate.initialize(tsp); return tsp; } @Autowired  ServerConfService(ServerConfRepository serverConfRepository); ServerConfType getServerConf(); ServerConfType getOrCreateServerConf(); SecurityServerId getSecurityServerId(); ClientId getSecurityServerOwnerId(); List<TspType> getConfiguredTimestampingServices(); boolean isServerCodeInitialized(); boolean isServerOwnerInitialized(); ServerConfType saveOrUpdate(ServerConfType serverConfType);  }