package net.mollywhite.mbta.client;

import org.junit.Test;

import static org.junit.Assert.*;

public class TweetDetailsTest {

  @Test
  public void testGet() throws Exception {

  }
}

package net.mollywhite.mbta.client;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import net.mollywhite.mbta.api.Line;
import net.mollywhite.mbta.api.Station;
import net.mollywhite.mbta.api.Tweet;
import org.junit.Before;
import org.junit.Test;

import static io.dropwizard.testing.FixtureHelpers.fixture;
import static org.assertj.core.api.Assertions.assertThat;

public class TweetDetailsTest {
  private ObjectMapper mapper;

  @Before
  public void setUp() throws Exception {
    mapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
  }

  @Test
  public void testGetReplyTo() throws Exception {
    final Tweet tweet = mapper.readValue(fixture("fixtures/TweetWithReplyToFixture.json"), Tweet.class);
    final TweetDetails tweetDetails = new TweetDetails(tweet).get();
    assertThat(tweetDetails.getLines()).isEmpty();
    assertThat(tweetDetails.getBranches()).isEmpty();
    assertThat(tweetDetails.getStations()).isEmpty();
  }

  @Test
  public void testRetweet() throws Exception {
    final Tweet tweet = mapper.readValue(fixture("fixtures/RetweetFixture.json"), Tweet.class);
    final TweetDetails tweetDetails = new TweetDetails(tweet).get();
    assertThat(tweetDetails.getLines()).containsExactly(Line.ORANGE);
    assertThat(tweetDetails.getBranches()).isEmpty();
    assertThat(tweetDetails.getStations()).containsExactly(Station.WELLINGTON, Station.OAKGROVE);
  }
}

Add TweetDetails test