Overriding equals() method in Java
Short question: Why does Java allow overriding equals()
, why is it not final?
Overriding equals() method in Java
Short question: Why does Java allow overriding equals()
, why is it not final?
domain driven design value object behavior
I recently finished Steve Smith and Julie Lerman’s excellent Pluralsight course on Domain Driven Design, and I’m applying the training to a project. I have what I think is a good candidate for a value object: MeasurementSpecification. In the problem domain, a measurement specification always has a nominal value, a minimum tolerance, and a maximum tolerance. A model may look something like this:
domain driven design value object behavior
I recently finished Steve Smith and Julie Lerman’s excellent Pluralsight course on Domain Driven Design, and I’m applying the training to a project. I have what I think is a good candidate for a value object: MeasurementSpecification. In the problem domain, a measurement specification always has a nominal value, a minimum tolerance, and a maximum tolerance. A model may look something like this:
Is it really a bad practice to mock a POJO (value object) if you don’t care about what it contains?
In the advice of Mockito about how to write good tests, it is written that we should not mock value objects (https://github.com/mockito/mockito/wiki/How-to-write-good-tests#dont-mock-value-objects). They even say