@Test
	void shouldPublishRegistrationEvents() {
		assertThat(preEventListener.wasFired).isTrue();
		assertThat(preEventListener.registration).isInstanceOf(EurekaRegistration.class);
		assertThat(preEventListener.registration.getPort()).isEqualTo(serverPort);
		assertThat(postEventListener.wasFired).isTrue();
		assertThat(postEventListener.config.getNonSecurePort()).isEqualTo(serverPort);
	}
Integration tests for {@link EurekaAutoServiceRegistration}.

@author Olga Maciaszek-Sharma
spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/eureka/serviceregistry/EurekaAutoServiceRegistrationIntegrationTests.java