Added unittests for junctions with field mapping. (and fixed a mapping bug)