### Question:
LotteryTicketCheckResult { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } var other = (LotteryTicketCheckResult) obj; return checkResult == other.checkResult && prizeAmount == other.prizeAmount; } LotteryTicketCheckResult(CheckResult result);  LotteryTicketCheckResult(CheckResult result, int amount); CheckResult getResult(); int getPrizeAmount(); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test void testEquals() { var result1 = new LotteryTicketCheckResult(CheckResult.NO_PRIZE); var result2 = new LotteryTicketCheckResult(CheckResult.NO_PRIZE); assertEquals(result1, result2); var result3 = new LotteryTicketCheckResult(CheckResult.WIN_PRIZE, 300000); assertNotEquals(result1, result3); }