Add unit test for magn-4