add test for needs method of plugin