added finer details to test, corrected error type