diff --git a/test/openpower-pels/Makefile.include b/test/openpower-pels/Makefile.include
index b4c6a01..a098ad9 100644
--- a/test/openpower-pels/Makefile.include
+++ b/test/openpower-pels/Makefile.include
@@ -6,6 +6,7 @@
 	bcd_time_test \
 	device_callouts_test \
 	event_logger_test \
+	extended_user_data_test \
 	extended_user_header_test \
 	failing_mtms_test \
 	fru_identity_test \
@@ -39,6 +40,7 @@
 	$(top_builddir)/extensions/openpower-pels/callout.o \
 	$(top_builddir)/extensions/openpower-pels/callouts.o \
 	$(top_builddir)/extensions/openpower-pels/device_callouts.o \
+	$(top_builddir)/extensions/openpower-pels/extended_user_data.o \
 	$(top_builddir)/extensions/openpower-pels/extended_user_header.o \
 	$(top_builddir)/extensions/openpower-pels/failing_mtms.o \
 	$(top_builddir)/extensions/openpower-pels/fru_identity.o \
@@ -383,3 +385,14 @@
 	$(pel_test_utils_ldadd) \
 	$(top_builddir)/extensions/openpower-pels/service_indicators.o
 service_indicators_test_LDFLAGS = $(test_ldflags)
+
+extended_user_data_test_SOURCES = \
+	%reldir%/extended_user_data_test.cpp
+extended_user_data_test_CPPFLAGS = $(test_cppflags)
+extended_user_data_test_CXXFLAGS = $(test_cxxflags)
+extended_user_data_test_LDADD = \
+	$(test_ldadd) \
+	$(pel_test_utils_ldadd) \
+	$(FMT_LIBS) \
+	$(top_builddir)/extensions/openpower-pels/extended_user_data.o
+extended_user_data_test_LDFLAGS = $(test_ldflags)
diff --git a/test/openpower-pels/extended_user_data_test.cpp b/test/openpower-pels/extended_user_data_test.cpp
new file mode 100644
index 0000000..902cee6
--- /dev/null
+++ b/test/openpower-pels/extended_user_data_test.cpp
@@ -0,0 +1,139 @@
+/**
+ * Copyright © 2019 IBM Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "extensions/openpower-pels/extended_user_data.hpp"
+#include "pel_utils.hpp"
+
+#include <gtest/gtest.h>
+
+using namespace openpower::pels;
+
+TEST(ExtUserDataTest, UnflattenFlattenTest)
+{
+    auto eudSectionData = pelDataFactory(TestPELType::extendedUserDataSection);
+    Stream stream(eudSectionData);
+    ExtendedUserData eud(stream);
+
+    EXPECT_TRUE(eud.valid());
+    EXPECT_EQ(eud.header().id, 0x4544);
+    EXPECT_EQ(eud.header().size, eudSectionData.size());
+    EXPECT_EQ(eud.header().version, 0x01);
+    EXPECT_EQ(eud.header().subType, 0x02);
+    EXPECT_EQ(eud.header().componentID, 0x2000);
+    EXPECT_EQ(eud.creatorID(), 'O');
+
+    const auto& data = eud.data();
+
+    // The eudSectionData itself starts 4B after the 8B header
+    EXPECT_EQ(data.size(), eudSectionData.size() - 12);
+
+    for (size_t i = 0; i < data.size(); i++)
+    {
+        EXPECT_EQ(data[i], eudSectionData[i + 12]);
+    }
+
+    // Now flatten
+    std::vector<uint8_t> newData;
+    Stream newStream(newData);
+    eud.flatten(newStream);
+
+    EXPECT_EQ(eudSectionData, newData);
+}
+
+TEST(ExtUserDataTest, BadDataTest)
+{
+    auto data = pelDataFactory(TestPELType::extendedUserDataSection);
+    data.resize(8); // Too small
+
+    Stream stream(data);
+    ExtendedUserData eud(stream);
+    EXPECT_FALSE(eud.valid());
+}
+
+TEST(ExtUserDataTest, BadSizeFieldTest)
+{
+    auto data = pelDataFactory(TestPELType::extendedUserDataSection);
+
+    {
+        data[3] = 0xFF; // Set the size field too large
+        Stream stream(data);
+        ExtendedUserData eud(stream);
+        EXPECT_FALSE(eud.valid());
+    }
+    {
+        data[3] = 0x7; // Set the size field too small
+        Stream stream(data);
+        ExtendedUserData eud(stream);
+        EXPECT_FALSE(eud.valid());
+    }
+}
+
+TEST(ExtUserDataTest, ConstructorTest)
+{
+    std::vector<uint8_t> data{0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88};
+
+    ExtendedUserData eud{0x1112, 0x42, 0x01, 'B', data};
+
+    EXPECT_TRUE(eud.valid());
+    EXPECT_EQ(eud.header().id, 0x4544);
+    EXPECT_EQ(eud.header().size, 20);
+    EXPECT_EQ(eud.header().subType, 0x42);
+    EXPECT_EQ(eud.header().version, 0x01);
+    EXPECT_EQ(eud.header().componentID, 0x1112);
+    EXPECT_EQ(eud.flattenedSize(), 20);
+    EXPECT_EQ(eud.creatorID(), 'B');
+
+    const auto& d = eud.data();
+
+    EXPECT_EQ(d, data);
+}
+
+TEST(ExtUserDataTest, ShrinkTest)
+{
+    std::vector<uint8_t> data(100, 0xFF);
+
+    ExtendedUserData eud(0x1112, 0x42, 0x01, 'O', data);
+    EXPECT_TRUE(eud.valid());
+
+    // 4B aligned
+    EXPECT_TRUE(eud.shrink(88));
+    EXPECT_EQ(eud.flattenedSize(), 88);
+    EXPECT_EQ(eud.header().size, 88);
+
+    // rounded off
+    EXPECT_TRUE(eud.shrink(87));
+    EXPECT_EQ(eud.flattenedSize(), 84);
+    EXPECT_EQ(eud.header().size, 84);
+
+    // too big
+    EXPECT_FALSE(eud.shrink(200));
+    EXPECT_EQ(eud.flattenedSize(), 84);
+    EXPECT_EQ(eud.header().size, 84);
+
+    // way too small
+    EXPECT_FALSE(eud.shrink(3));
+    EXPECT_EQ(eud.flattenedSize(), 84);
+    EXPECT_EQ(eud.header().size, 84);
+
+    // the smallest it can go
+    EXPECT_TRUE(eud.shrink(16));
+    EXPECT_EQ(eud.flattenedSize(), 16);
+    EXPECT_EQ(eud.header().size, 16);
+
+    // one too small
+    EXPECT_FALSE(eud.shrink(15));
+    EXPECT_EQ(eud.flattenedSize(), 16);
+    EXPECT_EQ(eud.header().size, 16);
+}
diff --git a/test/openpower-pels/pel_utils.cpp b/test/openpower-pels/pel_utils.cpp
index a42b0b9..b596d34 100644
--- a/test/openpower-pels/pel_utils.cpp
+++ b/test/openpower-pels/pel_utils.cpp
@@ -145,6 +145,14 @@
     0x04, 0x04, 0x04, 0x04, // MRU ID 3
 };
 
+const std::vector<uint8_t> extendedUserDataSection{
+    // Header
+    0x45, 0x44, 0x00, 0x18, 0x01, 0x02, 0x20, 0x00,
+
+    // Creator ID 'O', and then data
+    0x4F, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+    0x05, 0x0A, 0x0B, 0x0C};
+
 constexpr size_t sectionCountOffset = 27;
 constexpr size_t createTimestampPHOffset = 8;
 constexpr size_t commitTimestampPHOffset = 16;
@@ -174,7 +182,9 @@
                         UserDataSection.end());
             data.insert(data.end(), ExtUserHeaderSection.begin(),
                         ExtUserHeaderSection.end());
-            data.at(sectionCountOffset) = 6;
+            data.insert(data.end(), extendedUserDataSection.begin(),
+                        extendedUserDataSection.end());
+            data.at(sectionCountOffset) = 7;
             break;
         case TestPELType::privateHeaderSection:
             data.insert(data.end(), privateHeaderSection.begin(),
@@ -220,6 +230,9 @@
         case TestPELType::failingMTMSSection:
             data.insert(data.end(), failingMTMSSection.begin(),
                         failingMTMSSection.end());
+        case TestPELType::extendedUserDataSection:
+            data.insert(data.end(), extendedUserDataSection.begin(),
+                        extendedUserDataSection.end());
     }
     return data;
 }
diff --git a/test/openpower-pels/pel_utils.hpp b/test/openpower-pels/pel_utils.hpp
index 1c4eebb..da38fa9 100644
--- a/test/openpower-pels/pel_utils.hpp
+++ b/test/openpower-pels/pel_utils.hpp
@@ -59,7 +59,8 @@
     userHeaderSection,
     primarySRCSection,
     primarySRCSection2Callouts,
-    failingMTMSSection
+    failingMTMSSection,
+    extendedUserDataSection
 };
 
 /**
