GuestFeedSubscriber { String buildGuestUrl() { return format("http: }  @PostConstruct void init(); @Schedule(minute = "*/1", hour = "*") void updateFeed();  }
@Test public void the_guest_url_is_set_to_localhost_per_default() { assumeThat(getenv(GUEST_URI_ENV_PROPERTY_KEY), is(nullValue())); assertThat(new GuestFeedSubscriber().buildGuestUrl()).startsWith("http: }
@Test public void the_guest_url_includes_the_environment_config() { mockStatic(System.class); final String expectedConfig = "HOST:PORT"; when(System.getenv(GUEST_URI_ENV_PROPERTY_KEY)).thenReturn(expectedConfig); assertThat(new GuestFeedSubscriber().buildGuestUrl()).startsWith(format("http: }