anchor.diff:      {foreach,
        fun() -> test_util:setup(MockedModules),
                 meck:expect(chef_wm_util,object_name, fun(node, req) -> undefined end),
  -              meck:expect(wrq, method, fun(req) -> 'POST' end),
                 meck:expect(wrq, response_code, fun(req) -> 201 end),
                 meck:expect(chef_wm_util,object_name, fun(node, req) -> undefined end),
                 meck:expect(wrq, get_req_header,
  
positive.code:                           end)
       end,
       fun(_) -> test_util:cleanup(MockedModules) end,
       [{"end to end client test with no payload",
        fun() -> ExpectedMsg = msg(),
                 AssertPublishDataCorrect =
                     fun(_ServerName, RoutingKey, Message) ->
                         ?assertEqual(<<"erchef.node.create">>, RoutingKey),
                         ?assertEqual(ExpectedMsg, chef_json:decode(Message)),
  
negative.code:                ?assertEqual(ok, Ret)
         end
       },
       {"end to end client test, action create with payload",
        fun() -> ExpectedMsg = msg_with_payload(<<"create">>),
                 meck:expect(wrq, method, fun(req) -> 'POST' end),
                 AssertPublishDataCorrect =
                      fun(_ServerName, RoutingKey, Message) ->
                          ?assertEqual(<<"erchef.node.create">>, RoutingKey),
                          ?assertEqual(ExpectedMsg, chef_json:decode(Message)),
                          ok
                      end,
                  meck:expect(bunnyc, publish, AssertPublishDataCorrect),
                  application:set_env(oc_chef_wm, enable_actions_body, true),
                  Ret = oc_chef_action:log_action(req, State),
                  ?assertEqual(ok, Ret)
          end
        },
        {"end to end client test, action delete with no payload",
         fun() -> ExpectedMsg = msg(<<"delete">>),
                  meck:expect(wrq, method, fun(req) -> 'DELETE' end),
                  AssertPublishDataCorrect =
                     fun(_ServerName, RoutingKey, Message) ->
                         ?assertEqual(<<"erchef.node.delete">>, RoutingKey),
                         ?assertEqual(ExpectedMsg, chef_json:decode(Message)),
                         ok
                     end,
                 meck:expect(bunnyc, publish, AssertPublishDataCorrect),
                 application:set_env(oc_chef_wm, enable_actions_body, false),
                 Ret = oc_chef_action:log_action(req, State),
                 ?assertEqual(ok, Ret)
          end
         },
        {"end to end client test, action delete with data",
         fun() -> ExpectedMsg = msg_with_payload(<<"delete">>),
                  meck:expect(wrq, method, fun(req) -> 'DELETE' end),
                  AssertPublishDataCorrect =
                      fun(_ServerName, RoutingKey, Message) ->
                          ?assertEqual(<<"erchef.node.create">>, RoutingKey),
  