Test for getHashChain() in IBase.

Each interface has a getHashChain() method that
returns the hash of all .hal files from the rtti
of the interface up to IBase.

Test: hidl_test

Bug: 36602587
Change-Id: I53a79ba69edd109f169c37dbe0fd10e302eb929c
diff --git a/tests/hash/1.0/default/Hash.cpp b/tests/hash/1.0/default/Hash.cpp
new file mode 100644
index 0000000..caed721
--- /dev/null
+++ b/tests/hash/1.0/default/Hash.cpp
@@ -0,0 +1,30 @@
+#include "Hash.h"
+
+namespace android {
+namespace hardware {
+namespace tests {
+namespace hash {
+namespace V1_0 {
+namespace implementation {
+
+// Methods from ::android::hardware::tests::hash::V1_0::IHash follow.
+Return<void> Hash::dummy() {
+    return Void();
+}
+
+Return<void> Hash::functions() {
+    return Void();
+}
+
+// Methods from ::android::hidl::base::V1_0::IBase follow.
+
+IHash* HIDL_FETCH_IHash(const char* /* name */) {
+    return new Hash();
+}
+
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace hash
+}  // namespace tests
+}  // namespace hardware
+}  // namespace android