### Question:
LogicalPlan extends TreeNode implements QueryItemInterface { public CreateFunction getCreateFunction() { return createFunction; } 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 testCreateFunction() { String sql = "Create Function someFunction AS '/home/xyz' WITH VERSION '1.0' WITH ENDORSEMENT POLICY FILE '/home/username/fileloc' " + "WITH ARGS 'init', 500, 230"; LogicalPlan plan = getLogicalPlan(sql); CreateFunction actual = plan.getCreateFunction(); CreateFunction expected = buildCreateFunction(); assertEquals(expected, actual); }
@Test public void testCreateFlagInstall() { String sql = "CREATE CHAINCODE test_chain AS '/home/username/path' WITH VERSION '1.0' INSTALL ONLY"; LogicalPlan plan = getLogicalPlan(sql); CreateFunction actual = plan.getCreateFunction(); CreateFunction expected = buildCreateFlagInstall(); assertEquals(expected, actual); }
@Test public void testCreateFlagInstantiate() { String sql = "CREATE CHAINCODE test_chain AS '/home/username/path' WITH VERSION '1.0' INSTANTIATE ONLY"; LogicalPlan plan = getLogicalPlan(sql); CreateFunction actual = plan.getCreateFunction(); CreateFunction expected = buildCreateFlagInstantiate(); assertEquals(expected, actual); }