@Test
public void testGetHivePartitionsMultiplePathsFound()
{

    List<SchemaColumn> autoDiscoverableSubPartitionColumns = getPartitionColumns(Arrays.asList("Column1", "column2"));
    List<String> partitionPaths = Arrays.asList("/COLUMN1=111/COLUMN2=222", "/column1=111/COLUMN2=222");
    List<String> storageFilePaths = getStorageFilePaths(Arrays.asList(partitionPaths.get(0) + "/file.dat", partitionPaths.get(1) + "/file.dat"));
    // Create a business object data key without any sub-partitions.
    BusinessObjectDataKey businessObjectDataKey =
        new BusinessObjectDataKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, NO_SUBPARTITION_VALUES,
            DATA_VERSION);
    try
    {
        hive13DdlGenerator
            .getHivePartitions(businessObjectDataKey, autoDiscoverableSubPartitionColumns, TEST_S3_KEY_PREFIX, storageFilePaths, STORAGE_NAME);
        fail("Should throw an IllegalArgumentException when multiple locations exist for the same Hive partition.");
    }
    catch (IllegalArgumentException e)
    {
        assertEquals(String.format("Found two different locations for the same Hive partition. " +
                "Storage: {%s}, business object data: {%s}, S3 key prefix: {%s}, path[1]: {%s}, path[2]: {%s}", STORAGE_NAME,
            businessObjectDataHelper.businessObjectDataKeyToString(businessObjectDataKey), TEST_S3_KEY_PREFIX, partitionPaths.get(0),
            partitionPaths.get(1)), e.getMessage());
    }
}