This should be given a name that indicates that it has a side effect - in this case the setting of the symbol.

It also does a bunch of things affecting the inputs and outputs, which shouldn't be in a method that is only named as a verification.

Perhaps the refactoring might be clearer if it was the insides of the inner if statement that was extracted?