// Path: microsoft-azure-storage-test/src/com/microsoft/azure/storage/TestRunners.java
// public interface CloudTests {
// }
// 
// Path: microsoft-azure-storage-test/src/com/microsoft/azure/storage/TestRunners.java
// public interface DevFabricTests {
// }
// 
// Path: microsoft-azure-storage-test/src/com/microsoft/azure/storage/TestRunners.java
// public interface DevStoreTests {
// }
// 
// Path: microsoft-azure-storage-test/src/com/microsoft/azure/storage/table/TableTestHelper.java
// public static class Class1 extends TableServiceEntity implements PropertyResolver {
// 
//     public String A;
// 
//     public String B;
// 
//     public String C;
// 
//     public byte[] D;
// 
//     public Class1() {
//         // empty ctor
//     }
// 
//     public Class1(String pk, String rk) {
//         super(pk, rk);
//     }
// 
//     public synchronized String getA() {
//         return this.A;
//     }
// 
//     public synchronized String getB() {
//         return this.B;
//     }
// 
//     public synchronized String getC() {
//         return this.C;
//     }
// 
//     public synchronized byte[] getD() {
//         return this.D;
//     }
// 
//     public synchronized void setA(final String a) {
//         this.A = a;
//     }
// 
//     public synchronized void setB(final String b) {
//         this.B = b;
//     }
// 
//     public synchronized void setC(final String c) {
//         this.C = c;
//     }
// 
//     public synchronized void setD(final byte[] d) {
//         this.D = d;
//     }
// 
//     @Override
//     public EdmType propertyResolver(String pk, String rk, String key, String value) {
//         if (key.equals("A")) {
//             return EdmType.STRING;
//         }
//         else if (key.equals("B")) {
//             return EdmType.STRING;
//         }
//         else if (key.equals("C")) {
//             return EdmType.STRING;
//         }
//         else if (key.equals("D")) {
//             return EdmType.BINARY;
//         }
//         return null;
//     }
// }


import com.microsoft.azure.storage.StorageException;
import com.microsoft.azure.storage.TestRunners.CloudTests;
import com.microsoft.azure.storage.TestRunners.DevFabricTests;
import com.microsoft.azure.storage.TestRunners.DevStoreTests;
import com.microsoft.azure.storage.table.TableTestHelper.Class1;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import java.net.URISyntaxException;
import java.util.UUID;
import static org.junit.Assert.*;
        doEscapeTest("!<", false);
        doEscapeTest("<!%^&j", false);
    }

    @Test
    public void testXmlTestBatch() throws StorageException {
        doEscapeTest("</>", false);
        doEscapeTest("<tag>", false);
        doEscapeTest("</entry>", false);
        doEscapeTest("!<", false);
        doEscapeTest("<!%^&j", false);
    }

    private void doEscapeTest(String data, boolean useBatch) throws StorageException {
        doEscapeTest(data, useBatch, false);
    }

    private void doEscapeTest(String data, boolean useBatch, boolean includeInKey) throws StorageException {
        TableRequestOptions options = new TableRequestOptions();

        options.setTablePayloadFormat(TablePayloadFormat.JsonFullMetadata);
        doEscapeTestHelper(data, useBatch, includeInKey, options);

        options.setTablePayloadFormat(TablePayloadFormat.Json);
        doEscapeTestHelper(data, useBatch, includeInKey, options);

        options.setTablePayloadFormat(TablePayloadFormat.JsonNoMetadata);
        doEscapeTestHelper(data, useBatch, includeInKey, options);

        options.setTablePayloadFormat(TablePayloadFormat.JsonNoMetadata);
// Path: microsoft-azure-storage-test/src/com/microsoft/azure/storage/TestRunners.java
// public interface CloudTests {
// }
// 
// Path: microsoft-azure-storage-test/src/com/microsoft/azure/storage/TestRunners.java
// public interface DevFabricTests {
// }
// 
// Path: microsoft-azure-storage-test/src/com/microsoft/azure/storage/TestRunners.java
// public interface DevStoreTests {
// }
// 
// Path: microsoft-azure-storage-test/src/com/microsoft/azure/storage/table/TableTestHelper.java
// public static class Class1 extends TableServiceEntity implements PropertyResolver {
// 
//     public String A;
// 
//     public String B;
// 
//     public String C;
// 
//     public byte[] D;
// 
//     public Class1() {
//         // empty ctor
//     }
// 
//     public Class1(String pk, String rk) {
//         super(pk, rk);
//     }
// 
//     public synchronized String getA() {
//         return this.A;
//     }
// 
//     public synchronized String getB() {
//         return this.B;
//     }
// 
//     public synchronized String getC() {
//         return this.C;
//     }
// 
//     public synchronized byte[] getD() {
//         return this.D;
//     }
// 
//     public synchronized void setA(final String a) {
//         this.A = a;
//     }
// 
//     public synchronized void setB(final String b) {
//         this.B = b;
//     }
// 
//     public synchronized void setC(final String c) {
//         this.C = c;
//     }
// 
//     public synchronized void setD(final byte[] d) {
//         this.D = d;
//     }
// 
//     @Override
//     public EdmType propertyResolver(String pk, String rk, String key, String value) {
//         if (key.equals("A")) {
//             return EdmType.STRING;
//         }
//         else if (key.equals("B")) {
//             return EdmType.STRING;
//         }
//         else if (key.equals("C")) {
//             return EdmType.STRING;
//         }
//         else if (key.equals("D")) {
//             return EdmType.BINARY;
//         }
//         return null;
//     }
// }


// Path: microsoft-azure-storage-test/src/com/microsoft/azure/storage/table/TableEscapingTests.java
import com.microsoft.azure.storage.StorageException;
import com.microsoft.azure.storage.TestRunners.CloudTests;
import com.microsoft.azure.storage.TestRunners.DevFabricTests;
import com.microsoft.azure.storage.TestRunners.DevStoreTests;
import com.microsoft.azure.storage.table.TableTestHelper.Class1;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import java.net.URISyntaxException;
import java.util.UUID;
import static org.junit.Assert.*;

        doEscapeTest("!<", false);
        doEscapeTest("<!%^&j", false);
    }

    @Test
    public void testXmlTestBatch() throws StorageException {
        doEscapeTest("</>", false);
        doEscapeTest("<tag>", false);
        doEscapeTest("</entry>", false);
        doEscapeTest("!<", false);
        doEscapeTest("<!%^&j", false);
    }

    private void doEscapeTest(String data, boolean useBatch) throws StorageException {
        doEscapeTest(data, useBatch, false);
    }

    private void doEscapeTest(String data, boolean useBatch, boolean includeInKey) throws StorageException {
        TableRequestOptions options = new TableRequestOptions();

        options.setTablePayloadFormat(TablePayloadFormat.JsonFullMetadata);
        doEscapeTestHelper(data, useBatch, includeInKey, options);

        options.setTablePayloadFormat(TablePayloadFormat.Json);
        doEscapeTestHelper(data, useBatch, includeInKey, options);

        options.setTablePayloadFormat(TablePayloadFormat.JsonNoMetadata);
        doEscapeTestHelper(data, useBatch, includeInKey, options);

        options.setTablePayloadFormat(TablePayloadFormat.JsonNoMetadata);
        options.setPropertyResolver(new Class1());