remove duplicated code

This is a test PR for a batch update on all the plugins using the `logstash-devutils` gem
there might be a way for theses tests not to use the wire, the only thing they do is verify the client.hosts method argument parsing. we should return to this but for now LGTM