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 SumBusinessLogicTest
12 @DisplayName("A new sum can be started, if it does not exist")
13 public void testCanStartSumIfNotExists()
15 SumBusinessLogic sumBusinessLogic = new SumBusinessLogic();
16 assertThatNoException().isThrownBy(() -> sumBusinessLogic.startSum("foo"));
20 @DisplayName("Starting an already existing sum again, causes an IllegalStateException")
21 public void testStartSumCausesExceptionIfExists()
23 SumBusinessLogic sumBusinessLogic = new SumBusinessLogic();
24 sumBusinessLogic.startSum("foo");
25 assertThatIllegalStateException().isThrownBy(() -> sumBusinessLogic.startSum("foo"));