@Test public void readReturnsNullOnNotFound() { when(eventStore.readStreamEventsForward(any(), anyInt(), anyInt(), anyBoolean())) .thenReturn(wrapFuture(new StreamEventsSlice( SliceReadStatus.StreamNotFound, "stream", 0, ReadDirection.Forward, null, 1, 0, false))); EventReadResult<Event> response = repository.read("stream"); Assert.assertNull(response); }
@Override public EventReadResult<T> read(final String streamId, final int version, final int maxEvents) { return readInternal(toEsStreamId(streamId), version, maxEvents, false); }
EventStoreEsjcEventRepository implements EventRepository<T> { @Override public EventReadResult<T> read(final String streamId, final int version, final int maxEvents) { return readInternal(toEsStreamId(streamId), version, maxEvents, false); } }
EventStoreEsjcEventRepository implements EventRepository<T> { @Override public EventReadResult<T> read(final String streamId, final int version, final int maxEvents) { return readInternal(toEsStreamId(streamId), version, maxEvents, false); } EventStoreEsjcEventRepository(
            final String streamPrefix,
            final EventStore eventStore,
            final Class<T> eventClass,
            final ObjectMapper objectMapper,
            final EventNormalizer<T> normalizer); }
EventStoreEsjcEventRepository implements EventRepository<T> { @Override public EventReadResult<T> read(final String streamId, final int version, final int maxEvents) { return readInternal(toEsStreamId(streamId), version, maxEvents, false); } EventStoreEsjcEventRepository(
            final String streamPrefix,
            final EventStore eventStore,
            final Class<T> eventClass,
            final ObjectMapper objectMapper,
            final EventNormalizer<T> normalizer); @Override Class<T> getEventType(); @Override EventReadResult<T> readAll(final int version, final int maxEvents); @Override EventReadResult<T> read(final String streamId, final int version, final int maxEvents); @Override EventRecord<T> readFirst(final String streamId); @Override EventRecord<T> readLast(final String streamId); @Override int append(
            final String streamId,
            final List<EventData<T>> events,
            final ExpectedVersion version); @Override int getCurrentVersion(); @Override int getCurrentVersion(final String streamId); @Override Publisher<EventSubscriptionUpdate<T>> getStreamPublisher(
            final String streamId,
            final Integer fromVersion); @Override Publisher<EventSubscriptionUpdate<T>> getPublisher(final Integer fromVersion); }
EventStoreEsjcEventRepository implements EventRepository<T> { @Override public EventReadResult<T> read(final String streamId, final int version, final int maxEvents) { return readInternal(toEsStreamId(streamId), version, maxEvents, false); } EventStoreEsjcEventRepository(
            final String streamPrefix,
            final EventStore eventStore,
            final Class<T> eventClass,
            final ObjectMapper objectMapper,
            final EventNormalizer<T> normalizer); @Override Class<T> getEventType(); @Override EventReadResult<T> readAll(final int version, final int maxEvents); @Override EventReadResult<T> read(final String streamId, final int version, final int maxEvents); @Override EventRecord<T> readFirst(final String streamId); @Override EventRecord<T> readLast(final String streamId); @Override int append(
            final String streamId,
            final List<EventData<T>> events,
            final ExpectedVersion version); @Override int getCurrentVersion(); @Override int getCurrentVersion(final String streamId); @Override Publisher<EventSubscriptionUpdate<T>> getStreamPublisher(
            final String streamId,
            final Integer fromVersion); @Override Publisher<EventSubscriptionUpdate<T>> getPublisher(final Integer fromVersion);  }