use of org.eclipse.hono.application.client.kafka.KafkaApplicationClient in project hono by eclipse.
the class ReceiverTest method clientFactoryVariants.
private static Stream<ApplicationClient<? extends MessageContext>> clientFactoryVariants() {
final AmqpApplicationClient amqpApplicationClientFactory = mock(AmqpApplicationClient.class);
when(amqpApplicationClientFactory.connect()).thenReturn(Future.succeededFuture());
when(amqpApplicationClientFactory.createTelemetryConsumer(anyString(), VertxMockSupport.anyHandler(), VertxMockSupport.anyHandler())).thenReturn(Future.succeededFuture(mock(MessageConsumer.class)));
when(amqpApplicationClientFactory.createEventConsumer(anyString(), VertxMockSupport.anyHandler(), VertxMockSupport.anyHandler())).thenReturn(Future.succeededFuture(mock(MessageConsumer.class)));
final KafkaApplicationClient kafkaApplicationClientFactory = mock(KafkaApplicationClient.class);
when(kafkaApplicationClientFactory.createTelemetryConsumer(anyString(), VertxMockSupport.anyHandler(), VertxMockSupport.anyHandler())).thenReturn(Future.succeededFuture(mock(MessageConsumer.class)));
when(kafkaApplicationClientFactory.createEventConsumer(anyString(), VertxMockSupport.anyHandler(), VertxMockSupport.anyHandler())).thenReturn(Future.succeededFuture(mock(MessageConsumer.class)));
return Stream.of(amqpApplicationClientFactory, kafkaApplicationClientFactory);
}
Aggregations