equality() { assertThat(new Car("ford", "fiesta", "2005", "automatic", "red", "PK03MLJ")) .as("Check equality") .isEqualTo(new Car("ford", "fiesta", "2005", "automatic", "red", "PK03MLJ")); assertThat(testCar().build()) .as("Check equality") .isEqualTo(testCar().build()); } @Test public void colorEquality() { assertThat(new Car("ford", "fiesta", "2005", "automatic", "red", "PK03MLJ")) .as("Check color effects equality") .isNotEqualTo(new Car("ford", "fiesta", "2005", "automatic", "blue", "PK03MLJ")); assertThat(testCar().withColor("red").build()) .as("Check color effects equality") .isNotEqualTo(testCar().withColor("blue").build()); } @Test public void transmissionEquality() { assertThat(new Car("ford", "fiesta", "2005", "automatic", "red", "PK03MLJ")) .as("Check transmission effects equality") .isNotEqualTo(new Car("ford", "fiesta", "2005", "manual", "red", "PK03MLJ")); assertThat(testCar().withAutomaticTransmission().build()) .as("Check transmission effects equality") .isNotEqualTo(testCar().withManualTransmission().build()); } } 25