@Override
    public void executeUpdate(final AlterStorageUnitStatement sqlStatement, final ContextManager contextManager) {
        checkBefore(sqlStatement);
        Map<String, DataSourcePoolProperties> propsMap = DataSourceSegmentsConverter.convert(database.getProtocolType(), sqlStatement.getStorageUnits());
        validateHandler.validate(propsMap, getExpectedPrivileges(sqlStatement));
        try {
            contextManager.getPersistServiceFacade().getMetaDataManagerPersistService().alterStorageUnits(database.getName(), propsMap);
        } catch (final SQLException | ShardingSphereExternalException ex) {
            throw new StorageUnitsOperateException("alter", propsMap.keySet(), ex);
        }
    }
@Test
    void assertExecuteUpdateSuccess() {
        ResourceMetaData resourceMetaData = mock(ResourceMetaData.class, RETURNS_DEEP_STUBS);
        StorageUnit storageUnit = mock(StorageUnit.class, RETURNS_DEEP_STUBS);
        ConnectionProperties connectionProps = mockConnectionProperties("ds_0");
        when(storageUnit.getConnectionProperties()).thenReturn(connectionProps);
        when(resourceMetaData.getStorageUnits()).thenReturn(Collections.singletonMap("ds_0", storageUnit));
        when(database.getResourceMetaData()).thenReturn(resourceMetaData);
        assertDoesNotThrow(() -> executor.executeUpdate(createAlterStorageUnitStatement("ds_0"), mockContextManager(mock(MetaDataContexts.class, RETURNS_DEEP_STUBS))));
    }