Simplifying unit tests and removing redundant variable assignments.