java - MockMvcResultMatchers.jsonPath number -
i have serialized zoneddatetime unix timestamp check if serialization worked. therefore did following:
mockmvc.perform(get("/anypath/")) .andexpect(jsonpath("$.time", is(time.toepochsecond())));
but check fails because timestamp serialized 9 digits after dot. ie 1824379112.000000000
, not seem match w1starttime.toepochsecond()
. tried convert value handed on is()
function serveral different types including string, bigdecimal, double, double, etc.
what have match serialized number?
Comments
Post a Comment