### Question:
LogicalPlan extends TreeNode implements QueryItemInterface { public SmartCnrtDeploy getSmartCnrtDeploy() { return smartCnrtDeploy; } LogicalPlan(String description); TreeNode getCurrentNode(); void setCurrentNode(TreeNode currentNode); Query getQuery(); void setQuery(Query query); CreateFunction getCreateFunction(); void setCreateFunction(CreateFunction createFunction); ClassName getClassName(); void setClassName(ClassName className); Insert getInsert(); void setInsert(Insert insert); CallFunction getCallFunction(); void setCallFunction(CallFunction callFunction); CreateAsset getCreateAsset(); void setCreateAsset(CreateAsset createAsset); DeleteFunction getDeleteFunction(); void setDeleteFunction(DeleteFunction deleteFunction); DropAsset getDropAsset(); void setDropAsset(DropAsset dropAsset); UpgradeFunction getUpgradeFunction(); void setSmartCnrtDeploy(SmartCnrtDeploy smartCnrtDeploy); SmartCnrtDeploy getSmartCnrtDeploy(); void setUpgradeFunction(UpgradeFunction upgradeFunction); void setCreateUser(CreateUser createUser); CreateUser getCreateUser(); SQLType getType(); void setType(SQLType type); @Override Object clone();  }### Answer:
@Test public void testDeploySmartContract() { String sql = "DEPLOY smartcontract 'com.impetus.blkchn.eth.FirstSmartContract'()"; LogicalPlan plan = getLogicalPlan(sql); SmartCnrtDeploy actual = plan.getSmartCnrtDeploy(); SmartCnrtDeploy expected = new SmartCnrtDeploy(); expected.addChildNode(new ClassName("'com.impetus.blkchn.eth.FirstSmartContract'")); assertEquals(expected, actual); }
@Test public void testDeploySmartContractParameters() { String sql = "DEPLOY smartcontract 'com.impetus.blkchn.eth.FirstSmartContract'('xyz','qwerty',500,[1,2,3],HEX('0x123'))"; LogicalPlan plan = getLogicalPlan(sql); SmartCnrtDeploy actual = plan.getSmartCnrtDeploy(); SmartCnrtDeploy expected = new SmartCnrtDeploy(); expected.addChildNode(new ClassName("'com.impetus.blkchn.eth.FirstSmartContract'")); Parameters parameters = new Parameters(); parameters.addChildNode(new IdentifierNode("'xyz'")); parameters.addChildNode(new IdentifierNode("'qwerty'")); parameters.addChildNode(new IdentifierNode("500")); ListAgrs lstArgs = new ListAgrs(); Parameters lstParameters = new Parameters(); lstParameters.addChildNode(new IdentifierNode("1")); lstParameters.addChildNode(new IdentifierNode("2")); lstParameters.addChildNode(new IdentifierNode("3")); lstArgs.addChildNode(lstParameters); BytesArgs byt = new BytesArgs("HEX('0x123')"); parameters.addChildNode(lstArgs); parameters.addChildNode(byt); expected.addChildNode(parameters); assertEquals(expected, actual); }