test/message/read: Use googletest and mocks

Similar to the append test, this test case relied on an ad-hoc system
using a separate daemon thread for echoing the messages back to each of
the unit tests. We don't want to depend on a system dbus instance if we
can avoid it. Instead, use the mocking system to make sure the correct
dbus calls are made when reading messages and ensure the resulting
output is built as expected.

Tested:
    Build still works and all test cases pass. Ensured that the coverage
    of the tests is the same as the old test cases.

Change-Id: I8d71c031391b962f1de6684d927b81e132c0886d
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index 961db6c..c0fc378 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -10,8 +10,6 @@
 test_ldadd = $(top_builddir)/libsdbusplus.la $(SYSTEMD_LIBS) \
              $(OESDK_TESTCASE_FLAGS) $(CODE_COVERAGE_LIBS)
 gtest_ldadd = $(test_ldadd) $(GTEST_LIBS) $(GMOCK_LIBS) -lgmock_main
-legacy_test_cxxflags = $(AM_CXXFLAGS) $(PTHREAD_CFLAGS)
-legacy_test_ldadd = $(test_ldadd) $(PTHREAD_LIBS)
 
 check_PROGRAMS =
 TESTS = $(check_PROGRAMS)
@@ -34,8 +32,7 @@
 
 check_PROGRAMS += message_read
 message_read_SOURCES = message/read.cpp
-message_read_CXXFLAGS = $(legacy_test_cxxflags)
-message_read_LDADD = $(legacy_test_ldadd)
+message_read_LDADD = $(gtest_ldadd)
 
 check_PROGRAMS += message_native_types
 message_native_types_SOURCES = message/native_types.cpp