I have a resource that returns me an object with java.time.Instant
property.
class X {
...
private Instant startDate;
...
}
And I am testing it with:
mockMvc.perform(get("/api/x"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.content.[*].startDate").value(hasItem(MY_INSTANT_DATE)));
But what I get from JUnit is:
Expected: a collection containing <2018-06-08T11:46:50.292Z> but: was <1528458378.397000000>
How can I map my Instant
date to this format?