79589628

Date: 2025-04-23 23:41:49
Score: 1.5
Natty:
Report link

Inside mockStatic constructor, use

withSettings().defaultAnswer(invocation -> {
                    if ("now".equals(invocation.getMethod().getName())) {
                        return (your now mock);
                    }
                    return invocation.callRealMethod();
                })
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Anonymous