Where mutable variables are needed, I prefer to hide that logic inside a method that exists solely to do that dirty business on an abstract level, not specific to my business logic. That let's me test the 'dirty' mutable method in an isolated place and removes a whole class of mutability-related bugs from my business logic code.
Working on Java, this used to be nigh-impossible, but the Java 8 additions have truly made my life easier.