Added tests for recent bug fixes and updated expected results.