Fix add-class and generate-protocol assertion cases