migrate plugin tests, add test_data and some corrections