// Path: identity-service/src/main/java/eu/nimble/core/infrastructure/identity/messaging/KafkaReceiver.java
// @Component
// public class KafkaReceiver {
//     @KafkaListener(topics = "${nimble.kafka.topics.companyUpdates}", containerFactory = "companyUpdatesKafkaListenerContainerFactory")
//         public void receiveCompanyUpdates(ConsumerRecord<String, KafkaConfig.AuthorizedCompanyUpdate> consumerRecord) {
//         System.out.println("Receiver: " + consumerRecord.value().getCompanyId());
//     }
// }


import eu.nimble.core.infrastructure.identity.messaging.KafkaReceiver;
import org.mockito.Mockito;
import org.springframework.boot.test.context.TestConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
import org.springframework.context.annotation.Profile;
import java.io.IOException;
package eu.nimble.core.infrastructure.identity.config;



/**
 * Created by Johannes Innerbichler on 09.10.18.
 */
@Profile("test")
@TestConfiguration
public class KafkaTestConfiguration {
    @Bean
// Path: identity-service/src/main/java/eu/nimble/core/infrastructure/identity/messaging/KafkaReceiver.java
// @Component
// public class KafkaReceiver {
//     @KafkaListener(topics = "${nimble.kafka.topics.companyUpdates}", containerFactory = "companyUpdatesKafkaListenerContainerFactory")
//         public void receiveCompanyUpdates(ConsumerRecord<String, KafkaConfig.AuthorizedCompanyUpdate> consumerRecord) {
//         System.out.println("Receiver: " + consumerRecord.value().getCompanyId());
//     }
// }


// Path: identity-service/src/test/java/eu/nimble/core/infrastructure/identity/config/KafkaTestConfiguration.java
import eu.nimble.core.infrastructure.identity.messaging.KafkaReceiver;
import org.mockito.Mockito;
import org.springframework.boot.test.context.TestConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
import org.springframework.context.annotation.Profile;
import java.io.IOException;

package eu.nimble.core.infrastructure.identity.config;



/**
 * Created by Johannes Innerbichler on 09.10.18.
 */
@Profile("test")
@TestConfiguration
public class KafkaTestConfiguration {
    @Bean
    @Primary