### Question:
AliasScript implements Serializable, IHasIdentifier { public IIdentifier getIdentifier() { return _id; } AliasScript();  AliasScript(ISQLAlias alias); boolean equals(Object rhs); int hashCode(); String toString(); IIdentifier getIdentifier(); String getSQL(); void setIdentifier(IIdentifier id); void setSQL(String value);  }### Answer:
@Test public void testGetIdentifier() throws Exception { classUnderTest.setIdentifier(null); assertNull(classUnderTest.getIdentifier()); }
@Test public void testEqualsAndHashcode() { IIdentifier id1 = mockHelper.createMock(IIdentifier.class); IIdentifier id2 = mockHelper.createMock(IIdentifier.class); ISQLAlias alias1 = mockHelper.createMock(ISQLAlias.class); EasyMock.expect(alias1.getIdentifier()).andStubReturn(id1); ISQLAlias alias2 = mockHelper.createMock(ISQLAlias.class); EasyMock.expect(alias2.getIdentifier()).andStubReturn(id2); mockHelper.replayAll(); AliasScript a = new AliasScript(alias1); AliasScript b = new AliasScript(alias1); AliasScript c = new AliasScript(alias2); AliasScript d = new AliasScript(alias1) { private static final long serialVersionUID = 1L; }; new EqualsTester(a, b, c, d); mockHelper.verifyAll(); }