Add tests for $#swapClasses()