NoParamsStream extends JpaStream { @Override public JpaStreamEvent createEvent(final StreamId streamId, final JpaEvent eventEntry) { return new NoParamsEvent(streamId, incVersion(), eventEntry); } protected  NoParamsStream();  NoParamsStream(@NotNull final StreamId streamId); @Override JpaStreamEvent createEvent(final StreamId streamId, final JpaEvent eventEntry); @Override String toString();  }
@Test public void testCreateEvent() { final StreamId streamId = new SimpleStreamId("AnyName"); final NoParamsStream testee = new NoParamsStream(streamId); final JpaEvent eventEntry = new JpaEvent(); final long version = testee.getVersion(); final JpaStreamEvent result = testee.createEvent(streamId, eventEntry); assertThat(result).isNotNull(); assertThat(result.getEvent()).isSameAs(eventEntry); assertThat(testee.getVersion()).isEqualTo(version + 1); }