src/test/java/com/stijndepestel/geminio/ReplayTest.java
/**
     * Test that the replayed events are equal to the original events.
     */
Test that the replayed events are equal to the original events.
Test that the replayed events are equal to the original events .
@Test
    public void eventsReplayedTest() {
        this.replay = new Replay<>(TestHelper::deserialize, this::provideJSON,
                this::eventsReplayedTestHelper);
        final TestReplayListener listener = new TestReplayListener();
        this.replay.addReplayListener(listener);
        this.replay.load().startReplay();
        Awaitility.await().atMost(1, TimeUnit.SECONDS)
                .until(this.hasReplayEnded(listener));
        Assert.assertEquals("All events were replayed", this.fakeEvents.length,
                listener.getLastEndedEventsCount());
        Assert.assertTrue("Replay is in stopped state.",
                this.replay.hasEnded());
    }
@ Test public void eventsReplayedTest ( ) { this . replay = new Replay < > ( TestHelper :: deserialize , this :: provideJSON , this :: eventsReplayedTestHelper ) ; final TestReplayListener listener = new TestReplayListener ( ) ; this . replay . addReplayListener ( listener ) ; this . replay . load ( ) . startReplay ( ) ; Awaitility . await ( ) . atMost ( 1 , TimeUnit . SECONDS ) . until ( this . hasReplayEnded ( listener ) ) ; Assert . assertEquals ( "All events were replayed" , this . fakeEvents . length , listener . getLastEndedEventsCount ( ) ) ; Assert . assertTrue ( "Replay is in stopped state." , this . replay . hasEnded ( ) ) ; }
Test that the replayed events are equal to the original events.
Test that the replayed events are equal to the original events .