public List<ConnectorMetadataUpdateHandle> getMetadataUpdateResults(List<ConnectorMetadataUpdateHandle> metadataUpdateRequests, QueryId queryId)
    {
        ImmutableList.Builder<ConnectorMetadataUpdateHandle> metadataUpdateResults = ImmutableList.builder();

        for (ConnectorMetadataUpdateHandle connectorMetadataUpdateHandle : metadataUpdateRequests) {
            HiveMetadataUpdateHandle request = (HiveMetadataUpdateHandle) connectorMetadataUpdateHandle;
            String fileName = getFileName(request, queryId);
            metadataUpdateResults.add(new HiveMetadataUpdateHandle(request.getRequestId(), request.getSchemaTableName(), request.getPartitionName(), Optional.of(fileName)));
        }
        return metadataUpdateResults.build();
    }
@Test
    public void testHiveFileRenamer()
    {
        HiveFileRenamer hiveFileRenamer = new HiveFileRenamer();
        List<ConnectorMetadataUpdateHandle> requests = ImmutableList.of(TEST_HIVE_METADATA_UPDATE_REQUEST);
        List<ConnectorMetadataUpdateHandle> results = hiveFileRenamer.getMetadataUpdateResults(requests, TEST_QUERY_ID);

        // Assert # of requests is equal to # of results
        assertEquals(requests.size(), results.size());

        HiveMetadataUpdateHandle result = (HiveMetadataUpdateHandle) results.get(0);

        assertEquals(result.getRequestId(), TEST_REQUEST_ID);
        assertEquals(result.getSchemaTableName(), TEST_SCHEMA_TABLE_NAME);
        assertEquals(result.getPartitionName(), Optional.of(TEST_PARTITION_NAME));

        // Assert file name returned is "1"
        assertEquals(result.getMetadataUpdate(), Optional.of("0"));
    }