Unit tests for thrown errors in the work function.