public Collection<ConstraintMetaData> revise(final String tableName, final Collection<ConstraintMetaData> originalMetaDataList) {
        Optional<? extends ConstraintReviser<T>> reviser = reviseEntry.getConstraintReviser(rule, tableName);
        return reviser.isPresent()
                ? originalMetaDataList.stream()
                        .map(each -> reviser.get().revise(tableName, each, rule)).filter(Optional::isPresent).map(Optional::get).collect(Collectors.toCollection(LinkedHashSet::new))
                : originalMetaDataList;
    }
@SuppressWarnings("unchecked")
    @Test
    void assertReviseWithReturnsRevisedConstraints() {
        String tableName = "tableName";
        ConstraintReviser<ShardingSphereRule> reviser = mock(ConstraintReviser.class);
        doReturn(Optional.of(reviser)).when(mockMetaDataReviseEntry).getConstraintReviser(mockRule, tableName);
        ConstraintMetaData constraint1 = new ConstraintMetaData("constraint1", tableName);
        ConstraintMetaData constraint2 = new ConstraintMetaData("constraint2", tableName);
        ConstraintMetaData constraint3 = new ConstraintMetaData("constraint3", tableName);
        when(reviser.revise(tableName, constraint1, mockRule)).thenReturn(Optional.of(constraint3));
        when(reviser.revise(tableName, constraint2, mockRule)).thenReturn(Optional.empty());
        assertThat(engine.revise(tableName, Arrays.asList(constraint1, constraint2)), is(Collections.singleton(constraint3)));
    }