@Test public void equalsIgnoreId() { final Address addressWithoutId = Address.of(CountryCode.DE); final Address addressWithId = addressWithoutId.withId("foo"); assertThat(addressWithoutId) .isNotEqualTo(addressWithId) .matches(address -> address.equalsIgnoreId(addressWithId)); }