refactor: Refined (simplified) `StorageStrategy`
[demos/kafka/chat] / src / test / java / de / juplo / kafka / chat / backend / persistence / AbstractStorageStrategyIT.java
index 524e6f1..549faad 100644 (file)
@@ -16,24 +16,24 @@ import static pl.rzrz.assertj.reactor.Assertions.*;
 @Slf4j
 public abstract class AbstractStorageStrategyIT
 {
-  ChatHome chathome;
+  protected ChatHome chathome;
 
 
-  abstract StorageStrategy getStorageStrategy();
-  abstract Supplier<ChatHomeService> chatHomeServiceSupplier();
+  protected abstract StorageStrategy getStorageStrategy();
+  protected abstract Supplier<ChatHomeService> chatHomeServiceSupplier();
 
-  void start()
+  protected void start()
   {
     chathome = new ChatHome(chatHomeServiceSupplier().get());
   }
 
-  void stop()
+  protected void stop()
   {
-    getStorageStrategy().writeChatrooms(chathome.getChatRooms());
+    getStorageStrategy().write(chathome.getChatRooms());
   }
 
   @Test
-  void testStoreAndRecreate()
+  protected void testStoreAndRecreate()
   {
     start();