buffet: Use DBus utilities in buffet_client

Use chromeos::dbus_utils::AppendValueToWriter to send a dictionary
over DBus instead of writing it out manually.

Also added a parameter to TestMethod for more testing of DBus
communication between Buffet and buffet_client. Buffet replies
with the same string parameters (like an 'echo' service).

BUG=chromium:374864
TEST=USE=buffet P2_TEST_FILTER="buffet::*" FEATURES=test emerge-link platform2

Change-Id: Ib9d5a8e5173fac894e742cfda5f3fb52ea96f15b
Reviewed-on: https://chromium-review.googlesource.com/212683
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/buffet/manager.h b/buffet/manager.h
index 73ed8aa..ba7190d 100644
--- a/buffet/manager.h
+++ b/buffet/manager.h
@@ -59,7 +59,8 @@
   void HandleUpdateState(chromeos::ErrorPtr* error,
                          const std::string& json_state_fragment);
   // Handles calls to org.chromium.Buffet.Manager.Test()
-  void HandleTestMethod(chromeos::ErrorPtr* error);
+  std::string HandleTestMethod(chromeos::ErrorPtr* error,
+                               const std::string& message);
 
   chromeos::dbus_utils::DBusObject dbus_object_;