public void removeDataConnection(String name, boolean ifExists) {
        if (!dataConnectionStorage.removeDataConnection(name)) {
            if (!ifExists) {
                throw QueryException.error("Data connection does not exist: " + name);
            }
        } else {
            listeners.forEach(TableListener::onTableChanged);
        }
    }
@Test
    public void when_removesNonExistingDataConnectionWithIfExists_then_succeeds() {
        // given
        String name = "name";

        given(relationsStorage.removeDataConnection(name)).willReturn(false);

        // when
        // then
        dataConnectionResolver.removeDataConnection(name, true);
    }