1 package de.juplo.kafka;
3 import org.junit.jupiter.api.DisplayName;
4 import org.junit.jupiter.api.Test;
6 import static org.assertj.core.api.Assertions.*;
9 public class AdderBusinessLogicTest
12 @DisplayName("A new sum can be started, if it does not exist")
13 public void testCanStartSumIfNotExists()
15 AdderBusinessLogic adder = new AdderBusinessLogic();
16 assertThatNoException().isThrownBy(() -> adder.startSum("foo"));
20 @DisplayName("Starting an already existing sum again, causes an IllegalStateException")
21 public void testStartSumCausesExceptionIfExists()
23 AdderBusinessLogic adder = new AdderBusinessLogic();
24 adder.startSum("foo");
25 assertThatIllegalStateException().isThrownBy(() -> adder.startSum("foo"));