write Core.insert unit test