// 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/src/com/microsoft/azure/storage/table/TableRequestOptions.java
// public interface PropertyResolver {
// 
//     /**
//      * Given the partition key, row, key, and the property name, produces the EdmType
//      * 
//      * @param pk
//      *            A <code>String</code> which represents the partition key.
//      * @param rk
//      *            A <code>String</code> which represents the row key.
//      * @param key
//      *            A <code>String</code> which represents the property name.
//      * @param value
//      *            A <code>String</code> which represents the property value.
//      * @return
//      *         The {@link EdmType} of the property.
//      */
//     public EdmType propertyResolver(String pk, String rk, String key, String value);
// 
// }
// 
// 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.TableRequestOptions.PropertyResolver;
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.*;

        try {
            this.table.execute(TableOperation.retrieve(this.ent.getPartitionKey(), this.ent.getRowKey(), Class1.class),
                    this.options, null);
            fail("Invalid property resolver should throw");
        }
        catch (StorageException e) {
            assertEquals("Failed to parse property 'fooint' with value '1234' as type 'Edm.Guid'", e.getMessage());
        }
    }

    @Test
    public void testTableOperationRetrieveJsonNoMetadataResolverFail() {

        // set custom property resolver which throws
        this.options.setPropertyResolver(new ThrowingPropertyResolver());

        try {
            this.table.execute(TableOperation.retrieve(this.ent.getPartitionKey(), this.ent.getRowKey(), Class1.class),
                    this.options, null);
            fail("Invalid property resolver should throw");
        }
        catch (StorageException e) {
            assertEquals(
                    "The custom property resolver delegate threw an exception. Check the inner exception for more details.",
                    e.getMessage());
            assertTrue(e.getCause().getClass() == IllegalArgumentException.class);
        }
    }

// 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/src/com/microsoft/azure/storage/table/TableRequestOptions.java
// public interface PropertyResolver {
// 
//     /**
//      * Given the partition key, row, key, and the property name, produces the EdmType
//      * 
//      * @param pk
//      *            A <code>String</code> which represents the partition key.
//      * @param rk
//      *            A <code>String</code> which represents the row key.
//      * @param key
//      *            A <code>String</code> which represents the property name.
//      * @param value
//      *            A <code>String</code> which represents the property value.
//      * @return
//      *         The {@link EdmType} of the property.
//      */
//     public EdmType propertyResolver(String pk, String rk, String key, String value);
// 
// }
// 
// 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/TableODataTests.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.TableRequestOptions.PropertyResolver;
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.*;


        try {
            this.table.execute(TableOperation.retrieve(this.ent.getPartitionKey(), this.ent.getRowKey(), Class1.class),
                    this.options, null);
            fail("Invalid property resolver should throw");
        }
        catch (StorageException e) {
            assertEquals("Failed to parse property 'fooint' with value '1234' as type 'Edm.Guid'", e.getMessage());
        }
    }

    @Test
    public void testTableOperationRetrieveJsonNoMetadataResolverFail() {

        // set custom property resolver which throws
        this.options.setPropertyResolver(new ThrowingPropertyResolver());

        try {
            this.table.execute(TableOperation.retrieve(this.ent.getPartitionKey(), this.ent.getRowKey(), Class1.class),
                    this.options, null);
            fail("Invalid property resolver should throw");
        }
        catch (StorageException e) {
            assertEquals(
                    "The custom property resolver delegate threw an exception. Check the inner exception for more details.",
                    e.getMessage());
            assertTrue(e.getCause().getClass() == IllegalArgumentException.class);
        }
    }

    class CustomPropertyResolver implements PropertyResolver {