FourDigitNumber extends BaseSlotValue { @Override public boolean equals(Object o) { if (!super.equals(o)) return false; FourDigitNumber that = (FourDigitNumber) o; return number == that.number; } FourDigitNumber(com.amazon.ask.model.Slot slot, int first, int second, int third, int fourth); int[] getDigits(); int getFirstDigit(); int getSecondDigit(); int getThirdDigit(); int getFourthDigit(); int getNumber(); String stringValue(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void testEquals() { FourDigitNumber num1 = new FourDigitNumber(mockSlot, 0, 0, 0, 0); FourDigitNumber num2 = new FourDigitNumber(mockSlot, 0, 0, 0, 0); assertEquals(num1, num2); assertEquals(num1.getNumber(), num2.getNumber()); assertEquals(num1.getFirstDigit(), num2.getFirstDigit()); assertEquals(num1.getSecondDigit(), num2.getSecondDigit()); assertEquals(num1.getThirdDigit(), num2.getThirdDigit()); assertEquals(num1.getFourthDigit(), num2.getFourthDigit()); assertArrayEquals(num1.getDigits(), num2.getDigits()); assertEquals(num1.stringValue(), num2.stringValue()); assertEquals(num1.getSlot(), num2.getSlot()); assertEquals(num1.hashCode(), num2.hashCode()); assertEquals(num1.toString(), num2.toString()); }