ESHttpEventStore extends AbstractReadableEventStore implements IESHttpEventStore { static String type2str(final List<TypeName> eventTypes) { if (eventTypes == null) { return ""; } final StringBuilder sb = new StringBuilder(); for (final TypeName eventType : eventTypes) { sb.append(","); sb.append(eventType.asBaseType()); } return sb.toString(); } @Deprecated  ESHttpEventStore(@NotNull final ThreadFactory threadFactory, @NotNull final URL url, @NotNull final ESEnvelopeType envelopeType,
            @NotNull final SerializerRegistry serRegistry, @NotNull final DeserializerRegistry desRegistry); @Deprecated  ESHttpEventStore(@NotNull final ThreadFactory threadFactory, @NotNull final URL url, @NotNull final ESEnvelopeType envelopeType,
            @NotNull final SerializerRegistry serRegistry, @NotNull final DeserializerRegistry desRegistry,
            final CredentialsProvider credentialsProvider); private  ESHttpEventStore(@NotNull final ThreadFactory threadFactory, @NotNull final URL url, @NotNull final ESEnvelopeType envelopeType,
            @NotNull final SerializerRegistry serRegistry, @NotNull final DeserializerRegistry desRegistry,
            final CredentialsProvider credentialsProvider, final TenantId tenantId); @Override ESHttpEventStore open(); @Override void close(); @Override final boolean isSupportsCreateStream(); @Override final void createStream(final StreamId streamId); @Override final long appendToStream(final StreamId streamId, final CommonEvent... events); @Override final long appendToStream(final StreamId streamId, final long expectedVersion, final CommonEvent... events); @Override final long appendToStream(final StreamId streamId, final List<CommonEvent> events); @Override long appendToStream(final StreamId streamId, final long expectedVersion, final List<CommonEvent> commonEvents); @Override void deleteStream(final StreamId streamId, final long expectedVersion, final boolean hardDelete); @Override void deleteStream(final StreamId streamId, final boolean hardDelete); @Override StreamEventsSlice readEventsForward(final StreamId streamId, final long start, final int count); @Override StreamEventsSlice readEventsBackward(final StreamId streamId, final long start, final int count); @Override CommonEvent readEvent(final StreamId streamId, final long eventNumber); @Override final boolean streamExists(final StreamId streamId); @Override final StreamState streamState(final StreamId streamId); @Override boolean projectionExists(final StreamId projectionId); @Override final void enableProjection(final StreamId projectionId); @Override final void disableProjection(final StreamId projectionId); @Override final void createProjection(final StreamId projectionId, final boolean enable, final TypeName... eventType); @Override final void createProjection(final StreamId projectionId, final boolean enable, final List<TypeName> eventTypes); @Override final void deleteProjection(final StreamId projectionId);  }
@Test public void testType2str() { final List<TypeName> name1 = new ArrayList<>(); name1.add(new TypeName("one")); final List<TypeName> name2 = new ArrayList<>(); name2.add(new TypeName("one")); name2.add(new TypeName("two")); final List<TypeName> name3 = new ArrayList<>(); name3.add(new TypeName("one")); name3.add(new TypeName("two")); name3.add(new TypeName("three")); assertThat(ESHttpEventStore.type2str(null)).isEqualTo(""); assertThat(ESHttpEventStore.type2str(new ArrayList<>())).isEqualTo(""); assertThat(ESHttpEventStore.type2str(name1)).isEqualTo(",one"); assertThat(ESHttpEventStore.type2str(name2)).isEqualTo(",one,two"); assertThat(ESHttpEventStore.type2str(name3)).isEqualTo(",one,two,three"); }