Add unit test for topostfix function