Could someone please advice how to test service which works with JPA Entity and auditing (@lastModifiedDate).
lastModified is not the same as mock expected.
I understand that in every I can set any() as a parameter. But I want to verify call.
One option is to add one more class like AuditableAgentInfo and move lastModified inside it and make AgentInfo Embeddable.
Another option is to make lastModified nullable and set default value to null. This is good solution if I don't need to check it in future. But I think there will be requirement to check lastModified field.
Maybe somebody have more interesting ideas?