StorageSupport implements Storage { protected abstract void initialize() throws StorageExistsException;  @Override void writeHeader(String version); @Override String readVersion();  }
@Test @DisplayName("Initializes the storage before writing the header") public void testInitialize() throws Exception { storage.writeHeader("k.3"); assertThat(storage.initialized).isTrue(); InOrder inOrder = inOrder(storage); inOrder.verify(storage).initialize(); inOrder.verify(storage, atLeastOnce()).append(anyString()); }