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

vue.js - Create hooks for automated testing -

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

serial port - hub4com OVERRUN Error -