// Path: eventstore-client/src/main/java/de/qyotta/eventstore/communication/EsContextDefaultImpl.java
// public class EsContextDefaultImpl implements ESContext {
// 
//    private final CloseableHttpClient httpclient;
//    private final ESReader reader;
//    private final EventStoreSettings settings;
//    private final ESWriter writer;
// 
//    public EsContextDefaultImpl(final EventStoreSettings settings) {
//       this.settings = settings;
//       httpclient = HttpClientFactory.httpClient(settings);
// 
//       reader = new EsReaderDefaultImpl(httpclient);
//       writer = new EsWriterDefaultImpl(httpclient);
//    }
// 
//    @Override
//    public ESReader getReader() {
//       return reader;
//    }
// 
//    @Override
//    public EventStoreSettings getSettings() {
//       return settings;
//    }
// 
//    @Override
//    public ESWriter getWriter() {
//       return writer;
//    }
// 
// }
// 
// Path: eventstore-client/src/main/java/de/qyotta/eventstore/model/Event.java
// @Getter
// @Setter
// @Builder(toBuilder = true)
// @ToString
// @EqualsAndHashCode
// @NoArgsConstructor(access = AccessLevel.PUBLIC)
// @AllArgsConstructor(access = AccessLevel.PUBLIC)
// public class Event {
//    private String eventId;
//    private String eventType;
//    private Long eventNumber;
//    private String streamId;
//    private Boolean isLinkMetaData;
//    private Long positionEventNumber;
//    private String positionStreamId;
//    private String title;
//    private String id;
//    private String updated;
//    private Author author;
//    private String summary;
// 
//    private String eventStreamId;
//    private String data;
//    private String metadata;
// }
// 
// Path: eventstore-client/src/main/java/de/qyotta/eventstore/model/EventResponse.java
// @Getter
// @Setter
// @Builder(toBuilder = true)
// @ToString
// @EqualsAndHashCode
// @NoArgsConstructor(access = AccessLevel.PUBLIC)
// @AllArgsConstructor(access = AccessLevel.PUBLIC)
// public class EventResponse {
//    private String title;
//    private String id;
//    private String updated;
//    private Author author;
//    private String summary;
// 
//    private Event content;
// }
// 
// Path: eventstore-client/src/main/java/de/qyotta/eventstore/utils/EsUtils.java
// @UtilityClass
// @SuppressWarnings("nls")
// public class EsUtils {
//    private static final String SEQUENCE_NUMBER_TITLE_SEPERATOR = "@";
// 
//    public static long getEventNumber(final Entry entry) {
//       final String title = entry.getTitle();
//       final String subsequenceNumber = title.substring(0, title.indexOf(SEQUENCE_NUMBER_TITLE_SEPERATOR));
//       return Long.valueOf(subsequenceNumber);
//    }
// 
//    public static Date timestampOf(final Entry entry) {
//       return Date.from(Instant.parse(entry.getUpdated()));
//    }
// 
//    public static Date timestampOf(final EventResponse entry) {
//       return Date.from(Instant.parse(entry.getUpdated()));
//    }
// 
// }


import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.nullValue;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import java.time.Instant;
import java.util.Date;
import java.util.HashMap;
import java.util.UUID;
import org.exparity.hamcrest.date.DateMatchers;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import com.google.gson.Gson;
import de.qyotta.eventstore.communication.EsContextDefaultImpl;
import de.qyotta.eventstore.model.Event;
import de.qyotta.eventstore.model.EventResponse;
import de.qyotta.eventstore.utils.EsUtils;
package de.qyotta.eventstore;






@SuppressWarnings("nls")
public class EventStreamTest extends AbstractEsTest {
   private int numberOfStoredEvents;

   @Before
   public void setUp() {
// Path: eventstore-client/src/main/java/de/qyotta/eventstore/communication/EsContextDefaultImpl.java
// public class EsContextDefaultImpl implements ESContext {
// 
//    private final CloseableHttpClient httpclient;
//    private final ESReader reader;
//    private final EventStoreSettings settings;
//    private final ESWriter writer;
// 
//    public EsContextDefaultImpl(final EventStoreSettings settings) {
//       this.settings = settings;
//       httpclient = HttpClientFactory.httpClient(settings);
// 
//       reader = new EsReaderDefaultImpl(httpclient);
//       writer = new EsWriterDefaultImpl(httpclient);
//    }
// 
//    @Override
//    public ESReader getReader() {
//       return reader;
//    }
// 
//    @Override
//    public EventStoreSettings getSettings() {
//       return settings;
//    }
// 
//    @Override
//    public ESWriter getWriter() {
//       return writer;
//    }
// 
// }
// 
// Path: eventstore-client/src/main/java/de/qyotta/eventstore/model/Event.java
// @Getter
// @Setter
// @Builder(toBuilder = true)
// @ToString
// @EqualsAndHashCode
// @NoArgsConstructor(access = AccessLevel.PUBLIC)
// @AllArgsConstructor(access = AccessLevel.PUBLIC)
// public class Event {
//    private String eventId;
//    private String eventType;
//    private Long eventNumber;
//    private String streamId;
//    private Boolean isLinkMetaData;
//    private Long positionEventNumber;
//    private String positionStreamId;
//    private String title;
//    private String id;
//    private String updated;
//    private Author author;
//    private String summary;
// 
//    private String eventStreamId;
//    private String data;
//    private String metadata;
// }
// 
// Path: eventstore-client/src/main/java/de/qyotta/eventstore/model/EventResponse.java
// @Getter
// @Setter
// @Builder(toBuilder = true)
// @ToString
// @EqualsAndHashCode
// @NoArgsConstructor(access = AccessLevel.PUBLIC)
// @AllArgsConstructor(access = AccessLevel.PUBLIC)
// public class EventResponse {
//    private String title;
//    private String id;
//    private String updated;
//    private Author author;
//    private String summary;
// 
//    private Event content;
// }
// 
// Path: eventstore-client/src/main/java/de/qyotta/eventstore/utils/EsUtils.java
// @UtilityClass
// @SuppressWarnings("nls")
// public class EsUtils {
//    private static final String SEQUENCE_NUMBER_TITLE_SEPERATOR = "@";
// 
//    public static long getEventNumber(final Entry entry) {
//       final String title = entry.getTitle();
//       final String subsequenceNumber = title.substring(0, title.indexOf(SEQUENCE_NUMBER_TITLE_SEPERATOR));
//       return Long.valueOf(subsequenceNumber);
//    }
// 
//    public static Date timestampOf(final Entry entry) {
//       return Date.from(Instant.parse(entry.getUpdated()));
//    }
// 
//    public static Date timestampOf(final EventResponse entry) {
//       return Date.from(Instant.parse(entry.getUpdated()));
//    }
// 
// }


// Path: eventstore-client/src/test/java/de/qyotta/eventstore/EventStreamTest.java
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.nullValue;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import java.time.Instant;
import java.util.Date;
import java.util.HashMap;
import java.util.UUID;
import org.exparity.hamcrest.date.DateMatchers;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import com.google.gson.Gson;
import de.qyotta.eventstore.communication.EsContextDefaultImpl;
import de.qyotta.eventstore.model.Event;
import de.qyotta.eventstore.model.EventResponse;
import de.qyotta.eventstore.utils.EsUtils;

package de.qyotta.eventstore;






@SuppressWarnings("nls")
public class EventStreamTest extends AbstractEsTest {
   private int numberOfStoredEvents;

   @Before
   public void setUp() {
      client = new EventStoreClient(new EsContextDefaultImpl(EventStoreSettings.withDefaults()