@Test public void shouldTwoInstancesWithSameValuesBeEqual() { final IEXMessageHeader iexMessageHeader = defaultMessageHeader(); final List<IEXMessage> iexMessageList = asList(defaultTradeMessage(), defaultTradeMessage()); final IEXSegment iexSegment_1 = new TestIEXSegment(iexMessageHeader, iexMessageList); final IEXSegment iexSegment_2 = new TestIEXSegment(iexMessageHeader, iexMessageList); assertThat(iexSegment_1).isEqualTo(iexSegment_2); assertThat(iexSegment_1.hashCode()).isEqualTo(iexSegment_2.hashCode()); }
@Override public int hashCode() { return Objects.hash(messageHeader, messages); }
IEXSegment { @Override public int hashCode() { return Objects.hash(messageHeader, messages); } }
IEXSegment { @Override public int hashCode() { return Objects.hash(messageHeader, messages); } protected  IEXSegment(
            final IEXMessageHeader messageHeader,
            final List<IEXMessage> messages); }
IEXSegment { @Override public int hashCode() { return Objects.hash(messageHeader, messages); } protected  IEXSegment(
            final IEXMessageHeader messageHeader,
            final List<IEXMessage> messages); IEXMessageHeader getMessageHeader(); List<IEXMessage> getMessages(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
IEXSegment { @Override public int hashCode() { return Objects.hash(messageHeader, messages); } protected  IEXSegment(
            final IEXMessageHeader messageHeader,
            final List<IEXMessage> messages); IEXMessageHeader getMessageHeader(); List<IEXMessage> getMessages(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }