RecommendedReservation implements Recommended<RecommendedReservation, ReservationDescriptor, Reservation> { @Override public String toString() { return "RecommendedReservation{" + "recommendedInvestmentAmount=" + recommendedInvestment + ", reservationDescriptor=" + reservationDescriptor + '}'; } RecommendedReservation(final ReservationDescriptor reservationDescriptor, final Money amount); @Override ReservationDescriptor descriptor(); @Override Money amount(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }
@Test void notEqualsDifferentJavaType() { final RecommendedReservation r1 = new RecommendedReservation(mockDescriptor(), Money.from(200)); assertThat(r1).isNotEqualTo(r1.toString()); }