@Override
    public void close() throws Exception {
        super.close();
        collector = null;
        triggerContext = null;
        if (windowAggregator != null) {
            windowAggregator.close();
        }
    }
@Test
    public void testWindowCloseWithoutOpen() throws Exception {
        if (!UTC_ZONE_ID.equals(shiftTimeZone)) {
            return;
        }
        final int windowSize = 3;
        LogicalType[] windowTypes = new LogicalType[] {new BigIntType()};

        WindowOperator operator =
                WindowOperatorBuilder.builder()
                        .withInputFields(inputFieldTypes)
                        .withShiftTimezone(shiftTimeZone)
                        .countWindow(windowSize)
                        .aggregate(
                                new GeneratedNamespaceTableAggsHandleFunction<>(
                                        "MockClass", "", new Object[] {}),
                                accTypes,
                                aggResultTypes,
                                windowTypes)
                        .build();

        // close() before open() called
        operator.close();
    }