File tree Expand file tree Collapse file tree
src/test/java/com/baeldung Expand file tree Collapse file tree Original file line number Diff line number Diff line change 181181 </build >
182182
183183 <properties >
184+ <jackson .version>2.13.4</jackson .version>
184185 <kafka .version>3.4.0</kafka .version>
185186 <testcontainers-kafka .version>1.19.3</testcontainers-kafka .version>
186187 <testcontainers-jupiter .version>1.15.3</testcontainers-jupiter .version>
Original file line number Diff line number Diff line change 2929import static org .junit .Assert .assertArrayEquals ;
3030import static org .junit .Assert .assertEquals ;
3131
32- public class BackupCreatorIntegrationTest {
32+ public class BackupCreatorUnitTest {
3333 public static ObjectMapper mapper ;
3434
3535 @ Before
Original file line number Diff line number Diff line change 1010import java .util .List ;
1111import java .util .stream .Collectors ;
1212
13- public class WordCapitalizerIntegrationTest {
13+ public class WordCapitalizerUnitTest {
1414
1515 @ Test
1616 public void givenDataSet_whenExecuteWordCapitalizer_thenReturnCapitalizedWords () throws Exception {
Original file line number Diff line number Diff line change 2121import org .junit .Test ;
2222
2323public class KafkaStreamsLiveTest {
24- private String bootstrapServers = "localhost:9092" ;
25- private Path stateDirectory ;
24+ private final String bootstrapServers = "localhost:9092" ;
2625
2726 @ Test
2827 @ Ignore ("it needs to have kafka broker running on local" )
@@ -44,8 +43,8 @@ public void shouldTestKafkaStreams() throws InterruptedException {
4443
4544 // Use a temporary directory for storing state, which will be automatically removed after the test.
4645 try {
47- this . stateDirectory = Files .createTempDirectory ("kafka-streams" );
48- streamsConfiguration .put (StreamsConfig .STATE_DIR_CONFIG , this . stateDirectory .toAbsolutePath ()
46+ Path stateDirectory = Files .createTempDirectory ("kafka-streams" );
47+ streamsConfiguration .put (StreamsConfig .STATE_DIR_CONFIG , stateDirectory .toAbsolutePath ()
4948 .toString ());
5049 } catch (final IOException e ) {
5150 throw new UncheckedIOException ("Cannot create temporary directory" , e );
You can’t perform that action at this time.
0 commit comments