### Question:
SimplePrincipal implements Principal, Serializable { public boolean equals(Object obj) { if (!(obj instanceof SimplePrincipal)) { return false; } return name.equals(((SimplePrincipal)obj).name); } SimplePrincipal(String name); String getName(); boolean equals(Object obj); int hashCode(); String toString();  }### Answer:
@Test public void testEquals() { assertEquals(new SimplePrincipal("barry"), new SimplePrincipal("barry")); }