// Path: eventstore-client/src/main/java/de/qyotta/eventstore/utils/Constants.java
// public static final String ES_HARD_DELETE_HEADER = "ES-HardDelete";
// 
// 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;
// }


import static com.jayway.restassured.RestAssured.given;
import static de.qyotta.eventstore.utils.Constants.ES_HARD_DELETE_HEADER;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.UUID;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.gson.Gson;
import com.jayway.restassured.RestAssured;
import de.qyotta.eventstore.communication.EsContextDefaultImpl;
import de.qyotta.eventstore.model.Event;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;
   protected static final String HOST = BASE_URL + ":" + PORT;
   private static final String STREAMS = "/streams";
   protected static String BASE_STREAMS_URL = HOST + STREAMS + "/";
   protected Map<String, Event> expectedEvents;
   protected String streamName;
   protected EventStoreClient client;
   protected String streamUrl;

   protected static final Map<String, String> METADATA = new LinkedHashMap<>();
   static {
      METADATA.put("TEST", "TEST");
   }

   @BeforeClass
   public static void beforeClass() {
      RestAssured.baseURI = BASE_URL;
      RestAssured.port = PORT;
      RestAssured.basePath = STREAMS;
      if (!EVENT_STORE_PROVIDER.isRunning()) {
         EVENT_STORE_PROVIDER.start();
      }
   }

   @AfterClass
   public static void afterClass() {
      EVENT_STORE_PROVIDER.stop();
   }

   @Before
   public final void setupTest() {
// Path: eventstore-client/src/main/java/de/qyotta/eventstore/utils/Constants.java
// public static final String ES_HARD_DELETE_HEADER = "ES-HardDelete";
// 
// 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/test/java/de/qyotta/eventstore/AbstractEsTest.java
import static com.jayway.restassured.RestAssured.given;
import static de.qyotta.eventstore.utils.Constants.ES_HARD_DELETE_HEADER;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.UUID;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.gson.Gson;
import com.jayway.restassured.RestAssured;
import de.qyotta.eventstore.communication.EsContextDefaultImpl;
import de.qyotta.eventstore.model.Event;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;

   protected static final String HOST = BASE_URL + ":" + PORT;
   private static final String STREAMS = "/streams";
   protected static String BASE_STREAMS_URL = HOST + STREAMS + "/";
   protected Map<String, Event> expectedEvents;
   protected String streamName;
   protected EventStoreClient client;
   protected String streamUrl;

   protected static final Map<String, String> METADATA = new LinkedHashMap<>();
   static {
      METADATA.put("TEST", "TEST");
   }

   @BeforeClass
   public static void beforeClass() {
      RestAssured.baseURI = BASE_URL;
      RestAssured.port = PORT;
      RestAssured.basePath = STREAMS;
      if (!EVENT_STORE_PROVIDER.isRunning()) {
         EVENT_STORE_PROVIDER.start();
      }
   }

   @AfterClass
   public static void afterClass() {
      EVENT_STORE_PROVIDER.stop();
   }

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