add test for swap method in ai
add test for swap method in ai