### Question:
SDNCLcmPayloadBuilder { public static UpgradePostCheckPayload buildUpgradePostCheckPayload(DelegateExecution execution) { String requestPayload = String.valueOf(execution.getVariable(REQUEST_PAYLOAD)); UpgradePostCheckPayload upgradePostCheckPayload = new UpgradePostCheckPayload(); String ipaddressV4Oam = JsonUtils.getJsonValue(requestPayload, "ipaddressV4Oam"); upgradePostCheckPayload.setIpaddressV4Oam(ipaddressV4Oam); String oldSwVersion = JsonUtils.getJsonValue(requestPayload, "oldSwVersion"); upgradePostCheckPayload.setOldSwVersion(oldSwVersion); String targetSwVersion = String.valueOf(execution.getVariable(SoPropertyConstants.TARGET_SOFTWARE_VERSION)); if (targetSwVersion == null) { targetSwVersion = JsonUtils.getJsonValue(requestPayload, "targetSwVersion"); } upgradePostCheckPayload.setTargetSwVersion(targetSwVersion); String ruleName = JsonUtils.getJsonValue(requestPayload, "postCheckRuleName"); upgradePostCheckPayload.setRuleName(ruleName); String additionalData = JsonUtils.getJsonValue(requestPayload, "postCheckAdditionalData"); upgradePostCheckPayload.setAdditionalData(additionalData); String playbookName = JsonUtils.getJsonValue(requestPayload, "postCheckPlaybook"); if (playbookName != null) { upgradePostCheckPayload.setPlaybookName(playbookName); } return upgradePostCheckPayload; }  static ActivateNESwPayload buildActivateNESwPayload(DelegateExecution execution); static DownloadNESwPayload buildDownloadNESwPayload(DelegateExecution execution); static UpgradePostCheckPayload buildUpgradePostCheckPayload(DelegateExecution execution); static UpgradePreCheckPayload buildUpgradePreCheckPayload(DelegateExecution execution); static String convertToSting(Object msgObject);  }### Answer:
@Test public final void testBuildUpgradePostCheckPayload() { String expectedPayload = "{" + "\"ipaddress-v4-oam\":\"192.168.1.10\"," + "\"playbook-name\":\"postcheck_playbook\"," + "\"oldSwVersion\":\"v1\"," + "\"targetSwVersion\":\"v2\"," + "\"ruleName\":\"r102\"," + "\"additionalData\":\"{}\"" + "}"; UpgradePostCheckPayload upgradePostCheckPayload = SDNCLcmPayloadBuilder.buildUpgradePostCheckPayload(execution); try { String payload = SDNCLcmPayloadBuilder.convertToSting(upgradePostCheckPayload); logger.debug("UpgradePostCheckPayload:\n" + payload); assertEquals(expectedPayload, payload); } catch (JsonProcessingException e) { fail("Convert UpgradePostCheckPayload to String error: " + e.toString()); } }