@Override
	public int getPort() {
		if (port <= 0) {
			if (servletWebServerApplicationContext != null) {
				port = servletWebServerApplicationContext.getWebServer().getPort();
			}
			else if (reactiveWebServerApplicationContext != null) {
				port = reactiveWebServerApplicationContext.getWebServer().getPort();
			}
			else {
				throw new RuntimeException("Unsupported web type.");
			}
		}
		return port;
	}
@Test
	public void testGetPort() {
		assertThat(polarisRegistration1.getPort()).isEqualTo(PORT);
		assertThat(polarisRegistration2.getPort()).isEqualTo(PORT + 1);
		try {
			polarisRegistration3.getPort();
		}
		catch (RuntimeException e) {
			assertThat(e.getMessage()).isEqualTo("Unsupported web type.");
		}
		assertThat(polarisRegistration4.getPort()).isEqualTo(testLocalPort);
	}