### Question:
NicknameChangedEvent { public Nickname getOldNickname() { return oldNickname; } @ConstructorProperties({ "accountId", "nickname", "oldNickname" })  NicknameChangedEvent(String accountId, Nickname nickname, Nickname oldNickname); String getAccountId(); Nickname getNickname(); Nickname getOldNickname(); @Override boolean equals(final Object other); @Override int hashCode(); @Override String toString(); static final String EVENT_NAME; static final Map<String, Object> OLD_NICKNAME; static final Map<String, Object> MISSING_FIELDS_TO_V1; }### Answer:
@Test @DisplayName("contains the old nickname") void testContainsOldNickname() { eventToTest = new NicknameChangedEvent(ACCOUNT_ID, NICKNAME, OLD_NICKNAME); assertEquals(OLD_NICKNAME, eventToTest.getOldNickname()); }
@Test @DisplayName("the old nickname is none when set to null") void testAcceptsOldNicknameNull() { eventToTest = new NicknameChangedEvent(ACCOUNT_ID, NICKNAME, null); assertEquals(Nickname.none(), eventToTest.getOldNickname()); }