distributeClientMock := NewTestClient(func(req *http.Request) *http.Response {
if req.URL.String() == "http://consumerHost/target" {
assertions.Equal(req.Method, "POST")
distributeClientMock := NewTestClient(func(req *http.Request) *http.Response {
if req.URL.String() == "http://consumerHost/target" {
assertions.Equal(req.Method, "POST")
if waitTimeout(&wg, 2*time.Second) {
t.Error("Not all calls to server were made")
if waitTimeout(&wg, 2*time.Second) {
t.Error("Not all calls to server were made")