+ OicSecPstat_t *defaultPstat = (OicSecPstat_t *) OICCalloc(1, sizeof(*defaultPstat));
+ ASSERT_TRUE(defaultPstat != NULL);
+ defaultPstat->isOp = false;
+ uint8_t deviceId[] = {0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x69, 0x64, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x18, 0x5a, 0x9f};
+ memcpy(defaultPstat->deviceID.id, deviceId, sizeof(deviceId));
+ EXPECT_EQ(sizeof(defaultPstat->deviceID.id), sizeof(deviceId));
+ defaultPstat->commitHash = 1234;
+ defaultPstat->cm = (OicSecDpm_t) 63;
+ defaultPstat->tm = (OicSecDpm_t) 48;
+ defaultPstat->om = (OicSecDpom_t) 0;
+ defaultPstat->smLen = 1;
+ defaultPstat->sm = (OicSecDpom_t *)OICCalloc(defaultPstat->smLen, sizeof(*defaultPstat->sm));
+ ASSERT_TRUE(defaultPstat->sm != NULL);
+ defaultPstat->sm[0] = (OicSecDpom_t) 3;
+ size_t size = 0;
+ uint8_t *cbor = NULL;
+ EXPECT_EQ(OC_STACK_OK, PstatToCBORPayload(defaultPstat, &cbor, &size));
+ DeletePstatBinData(defaultPstat);
+ ASSERT_TRUE(cbor != NULL);
+
+ OCEntityHandlerRequest req = OCEntityHandlerRequest();