package com.lmax.disruptor;

import org.junit.Test;

import static org.hamcrest.core.IsNot.not;
import static org.junit.Assert.*;

public class SingleProducerSequencerTest
{
    @Test
    public void shouldNotUpdateCursorDuringHasAvailableCapacity() throws Exception
    {
        SingleProducerSequencer sequencer = new SingleProducerSequencer(16, new BusySpinWaitStrategy());

        for (int i = 0; i < 32; i++)
        {
            long next = sequencer.next();
            assertThat(sequencer.cursor.get(), not(next));

            sequencer.hasAvailableCapacity(13);
            assertThat(sequencer.cursor.get(), not(next));

            sequencer.publish(next);
        }
    }
}
@@ -39,16 +39,28 @@
 g.junit.
+jupiter.api.
 Test;%0A%0Ai
@@ -89,56 +89,75 @@
 est.
-core.IsNot.not;%0Aimport static org.junit.Assert.*
+MatcherAssert.assertThat;%0Aimport static org.hamcrest.core.IsNot.not
 ;%0A%0Ap

Rewrite SingleProducerSequencerTest in spirit of JUnit 5