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

Popular posts from this blog

javascript - Create a stacked percentage column -

vue.js - Create hooks for automated testing -

Optimising Firebase database by automatically overwriting data -