You may find the unit tests I've here useful.
I haven't worked hard to get a neat test infrastructure, so there is much room to improve. But it's a good start.