@Test public void testWhenOnApplicationEventReceivedShouldSetInternalPort() { given(routeEngineConfigurationAccess.getProperties()).willReturn(propertyDTO); given(propertyDTO.getProxyPort()).willReturn(9876); underTest.onApplicationEvent(null); assertEquals(9876, Whitebox.getInternalState(underTest, "internalPort")); }
@Override public void onApplicationEvent(final ContextRefreshedEvent event) { PropertyDTO propertyDTO = routeEngineConfigurationAccess.getProperties(); internalPort = propertyDTO.getProxyPort(); }
LocalhostRequestRouter implements ApplicationListener<ContextRefreshedEvent> { @Override public void onApplicationEvent(final ContextRefreshedEvent event) { PropertyDTO propertyDTO = routeEngineConfigurationAccess.getProperties(); internalPort = propertyDTO.getProxyPort(); } }
LocalhostRequestRouter implements ApplicationListener<ContextRefreshedEvent> { @Override public void onApplicationEvent(final ContextRefreshedEvent event) { PropertyDTO propertyDTO = routeEngineConfigurationAccess.getProperties(); internalPort = propertyDTO.getProxyPort(); }  }
LocalhostRequestRouter implements ApplicationListener<ContextRefreshedEvent> { @Override public void onApplicationEvent(final ContextRefreshedEvent event) { PropertyDTO propertyDTO = routeEngineConfigurationAccess.getProperties(); internalPort = propertyDTO.getProxyPort(); }  void reroute(final WilmaHttpRequest request); @Override void onApplicationEvent(final ContextRefreshedEvent event); }
LocalhostRequestRouter implements ApplicationListener<ContextRefreshedEvent> { @Override public void onApplicationEvent(final ContextRefreshedEvent event) { PropertyDTO propertyDTO = routeEngineConfigurationAccess.getProperties(); internalPort = propertyDTO.getProxyPort(); }  void reroute(final WilmaHttpRequest request); @Override void onApplicationEvent(final ContextRefreshedEvent event);  }