Add test for swap to new env