Skip to content

Commit

Permalink
Merge pull request #214 from martink76/bugfix/missing-xstream-exception
Browse files Browse the repository at this point in the history
Bugfix/missing xstream exception
  • Loading branch information
smcvb authored Dec 13, 2021
2 parents 6efd14c + 9437b22 commit f401fd9
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ protected static class TestConfiguration {

@Bean
public Serializer eventSerializer() {
return XStreamSerializer.builder().build();
return XStreamSerializer.defaultSerializer();
}

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,7 @@ public static class Builder<K, V> {
@SuppressWarnings("unchecked")
private KafkaMessageConverter<K, V> messageConverter =
(KafkaMessageConverter<K, V>) DefaultKafkaMessageConverter.builder()
.serializer(XStreamSerializer.builder()
.build())
.serializer(XStreamSerializer.defaultSerializer())
.build();
private MessageMonitor<? super EventMessage<?>> messageMonitor = NoOpMessageMonitor.instance();
private String topic = DEFAULT_TOPIC;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package org.axonframework.extensions.kafka.eventhandling.producer;

import org.junit.jupiter.api.*;
import org.junit.jupiter.api.extension.*;
import org.mockito.*;
import org.mockito.junit.jupiter.*;

import static org.junit.jupiter.api.Assertions.*;

@ExtendWith(MockitoExtension.class)
class KafkaPublisherBuilderTest {

@Mock
private ProducerFactory<String, byte[]> producerFactory;

@Test
void testKafkaPublisherInitialisationShouldNotThrowException() {
assertDoesNotThrow(() -> KafkaPublisher.<String, byte[]>builder()
.producerFactory(producerFactory)
.build());
}
}

0 comments on commit f401fd9

Please sign in to comment.