Updated test classes

Fixed a magnitude calculation error.