I'm a bit fan of Google's Truth.dev library. I have a large domain model in Java, and want to add several little custom assertions for them in my own Subject files. It's a bit of pain though to create the boiler plate for the Subjects every time though, and there are lot's obvious / straight forward assertions that I'd like to have by default.
Something similar to AssertJ's generator project.
For example, given the following simple model (mine is much more complicated):
@lombok.Value
public class Car {
String name;
Make make;
int colourId;
public enum Make {PLASTIC, METAL}
}
I would like to be able to do the following without coding anything myself:
assertThat(car).hasMakeEqualTo(PLASTIC);
assertThat(car).hasColourId().isAtLeast(5);
assertThat(car).hasName().ignoringTrailingWhiteSpace().equalTo("sally");
or
assertThat(person).hasAddress().hasStreet().ignoringCase().endsWith('Rd')