private void testComplexFilters(Set<String> operations, int lengthToGo, String pre, String post, Counter counter) throws InvalidSyntaxException {
        if (counter.counter == 0) {
            return;
        }
        if (lengthToGo == 0) {
            for (String filter : operations)
            {
                if (counter.counter == 0) {
                    return;
                }
                counter.counter--;
                testFilterSyntax(pre + filter + post, true, "Is valid syntax, but creates an error.");
                testFilterSyntax("(!" + pre + filter + post + ")", true, "Is valid syntax, but creates an error.");
            }
        }
        else {
            for (String operation : operations) {
                testComplexFilters(operations, lengthToGo - 1, pre + "(&" + operation, ")" + post, counter);
                testComplexFilters(operations, lengthToGo - 1, pre + "(|" + operation, ")" + post, counter);
                testComplexFilters(operations, 0, pre, post, counter);
            }
        }
    }