move the code for testing to test plugin.