public void addMetadataUpdateRequest(String schemaName, String tableName, Optional<String> partitionName, int writerIndex)
    {
        UUID requestId = UUID.randomUUID();
        requestFutureMap.put(requestId, SettableFuture.create());
        writerRequestMap.put(writerIndex, requestId);

        // create a request and add it to the queue
        hiveMetadataRequestQueue.add(new HiveMetadataUpdateHandle(requestId, new SchemaTableName(schemaName, tableName), partitionName, Optional.empty()));
    }
@Test
    public void testAddMetadataUpdateRequest()
    {
        HiveMetadataUpdater hiveMetadataUpdater = new HiveMetadataUpdater(EXECUTOR);

        // add Request
        hiveMetadataUpdater.addMetadataUpdateRequest(TEST_SCHEMA_NAME, TEST_TABLE_NAME, Optional.of(TEST_PARTITION_NAME), TEST_WRITER_INDEX);
        List<ConnectorMetadataUpdateHandle> hiveMetadataUpdateRequests = hiveMetadataUpdater.getPendingMetadataUpdateRequests();

        // assert the pending request queue size
        assertEquals(hiveMetadataUpdateRequests.size(), 1);

        // assert that request in queue is same as the request added
        HiveMetadataUpdateHandle request = (HiveMetadataUpdateHandle) hiveMetadataUpdateRequests.get(0);
        assertEquals(request.getSchemaTableName(), TEST_SCHEMA_TABLE_NAME);
        assertEquals(request.getPartitionName(), Optional.of(TEST_PARTITION_NAME));
    }