Added tests for correct error assertions.