Test that invalid levels throw exceptions.