Add a unit test inspired by `jackson-databind` test 543