@Override
    public Optional<IndexMetaData> revise(final String tableName, final IndexMetaData originalMetaData, final ShardingRule rule) {
        if (shardingTable.getActualDataNodes().isEmpty()) {
            return Optional.empty();
        }
        IndexMetaData result = new IndexMetaData(IndexMetaDataUtils.getLogicIndexName(originalMetaData.getName(), shardingTable.getActualDataNodes().iterator().next().getTableName()));
        result.getColumns().addAll(originalMetaData.getColumns());
        result.setUnique(originalMetaData.isUnique());
        return Optional.of(result);
    }
@Test
    void assertReviseWhenActualDataNodeIsEmpty() {
        shardingRule = createShardingRule();
        ShardingTable shardingTable = mock(ShardingTable.class);
        when(shardingTable.getActualDataNodes()).thenReturn(Collections.emptyList());
        shardingIndexReviser = new ShardingIndexReviser(shardingTable);
        IndexMetaData originalMetaData = new IndexMetaData("TEST_INDEX");
        Optional<IndexMetaData> revisedMetaData = shardingIndexReviser.revise("TABLE_NAME_1", originalMetaData, shardingRule);
        assertThat(revisedMetaData, is(Optional.empty()));
    }