better error message for unit test