Created test for generate the error