How to use the hibernatable websocket API on workers + durable objects?

I'm creating a worker + DO that accept websocket requests. I'm a little bit confused of how do I implement the hibernatable API. Does someone have an example? And also, how do I know that I did it right?
Was this page helpful?