adjust mock search to allow for custom query injection. Test if Csvwriter is called on format csv