### Question:
SDNCLcmPayloadBuilder { public static ActivateNESwPayload buildActivateNESwPayload(DelegateExecution execution) { String requestPayload = String.valueOf(execution.getVariable(REQUEST_PAYLOAD)); ActivateNESwPayload activateNESwPayload = new ActivateNESwPayload(); String ipaddressV4Oam = JsonUtils.getJsonValue(requestPayload, "ipaddressV4Oam"); activateNESwPayload.setIpaddressV4Oam(ipaddressV4Oam); String targetSwVersion = String.valueOf(execution.getVariable(SoPropertyConstants.TARGET_SOFTWARE_VERSION)); if (targetSwVersion == null) { targetSwVersion = JsonUtils.getJsonValue(requestPayload, "targetSwVersion"); } activateNESwPayload.setSwVersionToBeActivated(targetSwVersion); String playbookName = JsonUtils.getJsonValue(requestPayload, "activateNESwPlaybook"); if (playbookName != null) { activateNESwPayload.setPlaybookName(playbookName); } return activateNESwPayload; }  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 testBuildActivateNESwPayload() { String expectedPayload = "{" + "\"ipaddress-v4-oam\":\"192.168.1.10\"," + "\"playbook-name\":\"activatenesw_playbook\"," + "\"swVersionToBeActivated\":\"v2\"" + "}"; ActivateNESwPayload activateNESwPayload = SDNCLcmPayloadBuilder.buildActivateNESwPayload(execution); try { String payload = SDNCLcmPayloadBuilder.convertToSting(activateNESwPayload); logger.debug("ActivateNESwPayload:\n" + payload); assertEquals(expectedPayload, payload); } catch (JsonProcessingException e) { fail("Convert ActivateNESwPayload to String error: " + e.toString()); } }