InfoService { public InfoModel getInfo() { return InfoModel.builder() .version(version) .versionUpToDate(latest) .commitShort(commitShort) .publicKey(publicKey) .build(); }  @PostConstruct void init(); @Scheduled(fixedDelay = 1800000) void checkIfNewVersionAvailable(); InfoModel getInfo();  }
@Test public void shouldReturnInfo() { InfoModel info = infoService.getInfo(); assertThat(info).isNotNull(); }