Determine pcap value to send to occ

Change-Id: Ie60aac151f5fd8ce091020ce756834e4877cbc93
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
diff --git a/test/utest.cpp b/test/utest.cpp
new file mode 100644
index 0000000..e99d996
--- /dev/null
+++ b/test/utest.cpp
@@ -0,0 +1,30 @@
+#include <gtest/gtest.h>
+#include "powercap.hpp"
+
+using namespace open_power::occ;
+
+class VerifyOccInput : public ::testing::Test
+{
+    public:
+        VerifyOccInput() :
+            bus(sdbusplus::bus::new_default()),
+            occStatus(bus,"/test/path"),
+            pcap(bus,occStatus)
+        {}
+        ~VerifyOccInput()
+        {}
+
+        sdbusplus::bus::bus bus;
+        Status occStatus;
+        powercap::PowerCap pcap;
+};
+
+TEST_F(VerifyOccInput, PcapDisabled) {
+    uint32_t occInput = pcap.getOccInput(100,false);
+    EXPECT_EQ(occInput, 0);
+}
+
+TEST_F(VerifyOccInput, PcapEnabled) {
+    uint32_t occInput = pcap.getOccInput(100,true);
+    EXPECT_EQ(occInput, 90);
+}