public void TestSetStateValidationParameter()
        {
            ChaincodeStub stub = new ChaincodeStub("myc", "txId", handler.Object, new List <ByteString>(), null);

            byte[] value = new byte[] { 0x10, 0x20, 0x30 };
            stub.SetStateValidationParameter("key", value);
            handler.Verify((a) => a.PutStateMetadataAsync("myc", "txId", "", "key", ChaincodeStub.VALIDATION_PARAMETER, ByteString.CopyFrom(value), token));
            try
            {
                stub.SetStateValidationParameter(null, value);
                Assert.Fail("Null key check fails");
            }
            catch (ArgumentException)
            {
                //ignored
            }

            try
            {
                stub.SetStateValidationParameter("", value);
                Assert.Fail("Empty key check fails");
            }
            catch (ArgumentException)
            {
                //ignored
            }
        }