Added tests and improved assert output