Refactoring

Is when changing the structure of programming so that the function is not changed.

Also it is used to improve the design of an existing code base.

If we are making a refacatoring or behavior-preserving codemodification:

*we do not expect new behaviour

*we expect cleaner code when we are done.

*all our unit tests should pass before and after the modification.

If we are making a behaviour-changing code modification:

*We expect new behavoiur.

*we should write new tests.

*we may get dirtier code when we are done.