Add unit test for toBoolean.