package com.tempodb.it;

import org.joda.time.DateTime;
import org.junit.*;
import static org.junit.Assert.*;

import com.tempodb.*;


public class ClientIT {

  @Before
  public void setUp() {
  }

  @After
  public void tearDown() {
  }

  @Test
  public void testEquals() {
    assertEquals(1, 1);
  }
}

@@ -29,274 +29,2135 @@
 ort 
-org.joda.time.DateTime;%0Aimport org.junit.*;%0Aimport static org.junit.Assert.*;%0A%0Aimport com.tempodb.*;%0A%0A%0Apublic class ClientIT %7B%0A%0A  @Before%0A  public void setUp() %7B%0A  %7D%0A%0A  @After%0A  public void tearDown() %7B%0A  %7D%0A%0A  @Test%0A  public void testEquals() %7B%0A    assertEquals(1, 1
+java.util.ArrayList;%0Aimport java.util.Arrays;%0Aimport java.util.List;%0A%0Aimport org.joda.time.DateTime;%0Aimport org.joda.time.DateTimeZone;%0Aimport org.joda.time.Interval;%0Aimport org.junit.*;%0Aimport static org.junit.Assert.*;%0A%0Aimport com.tempodb.*;%0A%0A%0Apublic class ClientIT %7B%0A  private Client client = new Client(%22dc6943b5ec9c48df9f027ffd4a5c9a43%22, %22a7b88b6707cf481baefeb9de1f47479f%22, %22api-staging.tempo-db.com%22, 443, true);%0A  private DateTime start = new DateTime(1500, 1, 1, 0, 0, 0, 0);%0A  private DateTime end = new DateTime(3000, 1, 1, 0, 0, 0, 0);%0A  private DateTimeZone timezone = DateTimeZone.UTC;%0A%0A  @Before%0A  public void setUp() %7B%0A  %7D%0A%0A  @After%0A  public void tearDown() %7B%0A    /* Delete all datapoints all series */%0A    Cursor%3CSeries%3E cursor = client.getSeriesByFilter(new Filter());%0A    for(Series series : cursor) %7B%0A      Result%3CNothing%3E result = client.deleteDataPointsByKey(series.getKey(), new Interval(start, end));%0A    %7D%0A%0A    /* Delete all series */%0A    Result%3CDeleteSummary%3E result = client.deleteAllSeries();%0A  %7D%0A%0A  @Test%0A  public void testWriteDataPointKey() %7B%0A    DataPoint dp = new DataPoint(new DateTime(2012, 1, 1, 0, 0, 0, 0), 12.34);%0A    Result%3CNothing%3E result = client.writeDataPointsByKey(%22key1%22, Arrays.asList(dp));%0A    assertEquals(State.SUCCESS, result.getState());%0A  %7D%0A%0A  @Ignore%0A  @Test%0A  public void testReadDataPointKey() throws InterruptedException %7B%0A    DataPoint dp1 = new DataPoint(new DateTime(2012, 1, 2, 0, 0 ,0, 0, timezone), 23.45);%0A    DataPoint dp2 = new DataPoint(new DateTime(2012, 1, 2, 1, 0 ,0, 0, timezone), 34.56);%0A%0A    Result%3CNothing%3E result = client.writeDataPointsByKey(%22key1%22, Arrays.asList(dp1, dp2));%0A    Thread.sleep(2);%0A%0A    DateTime start = new DateTime(2012, 1, 2, 0, 0, 0, 0, timezone);%0A    DateTime end = new DateTime(2012, 1, 3, 0, 0, 0, 0, timezone);%0A%0A    List%3CDataPoint%3E expected = Arrays.asList(dp1, dp2);%0A%0A    Cursor%3CDataPoint%3E cursor = client.readDataPointsByKey(%22key1%22, new Interval(start, end), null, timezone);%0A    List%3CDataPoint%3E output = new ArrayList%3CDataPoint%3E();%0A    for(DataPoint dp : cursor) %7B%0A      output.add(dp);%0A    %7D%0A    assertEquals(expected, output
 );%0A 

Add integration tests for write datapoint and read datapoint