import java.util.Date;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.text.ParseException;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import com.google.appengine.api.datastore.Entity;
import com.google.appengine.tools.development.testing.LocalServiceTestHelper;
import com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig;
import org.junit.After;
import org.junit.Before;
import com.google.sps.data.Attendee;
import com.google.sps.data.AttendeeInterface;

/** Class that test the methods in the Attendee class. */
@RunWith(JUnit4.class)
public class AttendeeTest {
  private final LocalServiceTestHelper helper =
  new LocalServiceTestHelper(new LocalDatastoreServiceTestConfig());

  @Before
  public void setUp() {
   helper.setUp();
  }

  @After
  public void tearDown() {
   helper.tearDown();
  }

  @Test
  public void testGetters() {
    // Creates test data. 
    Date date = new Date();
    AttendeeInterface attendee = new Attendee("12345", "Taniece", date);
    Assert.assertEquals(attendee.getSessionId(), "12345");
    Assert.assertEquals(attendee.getScreenName(), "Taniece");
    Assert.assertEquals(attendee.getTimeLastPolled(), date);
  }

  @Test
  public void testConversionBetweenEntityAndAttendee() {
    // Creates test data. 
    AttendeeInterface attendee = new Attendee("12345", "Taniece", new Date());
    Entity testEntity = attendee.toEntity();
    AttendeeInterface newAttendee = Attendee.fromEntity(testEntity);
    Assert.assertTrue(attendee.equals(newAttendee));
  }
}
@@ -20,105 +20,8 @@
 te;%0A
-import java.text.DateFormat;%0Aimport java.text.SimpleDateFormat;%0Aimport java.text.ParseException;%0A
 impo
@@ -1520,10 +1520,295 @@
 e));%0A  %7D
+%0A%0A  @Test%0A  public void testEqualsMethod() %7B%0A    // Creates test data.%0A    AttendeeInterface attendee1 = new Attendee(%2212345%22, %22Jasmine%22, new Date());%0A    AttendeeInterface attendee2 = new Attendee(%2254321%22, %22Chris%22, new Date());%0A    Assert.assertFalse(attendee1.equals(attendee2));%0A  %7D
 %0A%7D

Update Test