google-ipmi-sys: Refactor to use new version of OEM IPMI Handler

Using the new version of ipmi handler provide a higher level wrapper
over the same functionalities. It helps us parse the input and output to
have more control of the input/output we see.

The input and output will be
`std::uint8_t, std::optional<std::vector<uint8_t>>`.

This represents `subcommand` and any input data.

Changes to note,
- all subcommand in the request/response struct are removed. It will be
  managed by the wrapper directly.
    - Unit tests checking for input with only the subcommand are
      removed.
- Move all reply struct to header files to be accessible in unit test.

Tested:
All IPMI OEM command still works the same as before this change.

Change-Id: I4230ab84a497a867248fe82224e32cc69b314b64
Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/test/helper.cpp b/test/helper.cpp
new file mode 100644
index 0000000..6f16b55
--- /dev/null
+++ b/test/helper.cpp
@@ -0,0 +1,32 @@
+#include "helper.hpp"
+
+#include <ipmid/api-types.hpp>
+#include <optional>
+#include <span>
+#include <utility>
+
+namespace google
+{
+namespace ipmi
+{
+
+std::pair<std::uint8_t, std::vector<std::uint8_t>>
+    ValidateReply(::ipmi::RspType<std::uint8_t, std::vector<uint8_t>> reply,
+                  bool hasData)
+{
+    // Reply is in the form of
+    // std::tuple<ipmi::Cc, std::optional<std::tuple<RetTypes...>>>
+    EXPECT_EQ(::ipmi::ccSuccess, std::get<0>(reply));
+
+    auto actualReply = std::get<1>(reply);
+    EXPECT_TRUE(actualReply.has_value());
+
+    auto subcommand = std::get<0>(*actualReply);
+    auto data = std::get<1>(*actualReply);
+    EXPECT_EQ(hasData, !data.empty());
+
+    return std::make_pair(subcommand, hasData ? data : std::vector<uint8_t>{});
+}
+
+} // namespace ipmi
+} // namespace google