https://linen.dev logo
a

Aleksei M

06/02/2023, 8:03 AM
Hi everyone! My test case requires stub creation with LocalDateTime and the problem is in differences between stub dateTime and actual dateTime which calculates in the testing method. I create a stub dto with localDateTime and pass it inside .withRequestBody(equalT0()) part of stubbing method. I am aware of possibility to mock Clock bean and passing fixed clock value, but unfortunately, I catch exception when I try to add @SpyBean Clock clock in my integration test config class. Is there any workarounds like ignoring some params from .withRequestBody(equal) method?
y

Yehor Kovalchuk

06/07/2023, 10:57 AM
Hey. Could you please share the code snippet ? I would be glad to help you.