In one of my previous posts I blogged about refactoring I did for my hobby project.
Robert C Martin has a nice video showing refactoring, using IntelliJ. Watch it here.
You can also see why unit testing is so important, as with each change the unit tests are being ran in order to check if anything got broken.