/**
 * EmailAddressTest
 * 
 * @author ${author}
 * @since 29-May-2016
 */
package uk.co.sleonard.unison.datahandling.DAO;

import org.junit.Assert;
import org.junit.Test;

import uk.co.sleonard.unison.datahandling.DAO.EmailAddress;

/**
 * The Class EmailAddressTest.
 *
 * @author Elton <elton_12_nunes@hotmail.com>
 * @since v1.2.0
 *
 */
public class EmailAddressTest {

	/**
	 * Test getEmail.
	 */
	@Test
	public void testGetEmail() {
		final String expected = "email";
		final EmailAddress actual = new EmailAddress(null, expected, null);
		Assert.assertEquals(expected, actual.getEmail());
	}

	/**
	 * Test getIpAddress.
	 */
	@Test
	public void testGetIpAddress() {
		final String expected = "ipAddress";
		final EmailAddress actual = new EmailAddress(null, null, expected);
		Assert.assertEquals(expected, actual.getIpAddress());
	}

	/**
	 * Test getName.
	 */
	@Test
	public void testGetName() {
		final String expected = "name";
		final EmailAddress actual = new EmailAddress(expected, null, null);
		Assert.assertEquals(expected, actual.getName());
	}

	/**
	 * Test HashCode.
	 */
	@Test
	public void testHashCode() {
		EmailAddress actual = new EmailAddress("user", "email@corporate.com", "127.0.0.1");
		Assert.assertEquals(2123816993, actual.hashCode());
		actual = new EmailAddress("user", "email@corporate.com", null);
		Assert.assertEquals(-1612454402, actual.hashCode());
		actual = new EmailAddress("user", null, null);
		Assert.assertEquals(3629098, actual.hashCode());
		actual = new EmailAddress(null, null, null);
		Assert.assertEquals(29791, actual.hashCode());
	}
}

@@ -116,32 +116,39 @@
 ng.DAO;%0A%0Aimport 
+static 
 org.junit.Assert
@@ -147,18 +147,30 @@
 t.Assert
+.assertTrue
 ;%0A
+%0A
 import o
@@ -182,73 +182,37 @@
 nit.
-Tes
+Asser
 t;%0A
-%0A
 import 
-uk.co.sleonard.unison.datahandling.DAO.EmailAddress
+org.junit.Test
 ;%0A%0A/
@@ -1123,32 +1123,33 @@
 ilAddress actual
+1
  = new EmailAddr
@@ -1203,68 +1203,28 @@
 ;%0A%09%09
-Assert.assertEquals(2123816993, actual.hashCode());%0A%09%09actual
+EmailAddress actual2
  = n
@@ -1236,32 +1236,33 @@
 ailAddress(%22user
+2
 %22, %22email@corpor
@@ -1246,32 +1246,33 @@
 (%22user2%22, %22email
+2
 @corporate.com%22,
@@ -1276,156 +1276,42 @@
 m%22, 
-null);%0A%09%09Assert.assertEquals(-1612454402, actual.hashCode());%0A%09%09actual = new EmailAddress(%22user%22, null, null);%0A%09%09Assert.assertEquals(3629098, 
+%22127.0.0.2%22);%0A%09%09assertTrue(
 actual
+1
 .has
@@ -1321,93 +1321,19 @@
 de()
-);%0A%09%09actual = new EmailAddress(null, null, null);%0A%09%09Assert.assertEquals(29791, actual
+ != actual2
 .has

fix hashcode test