@Override
  public void validateQuery(
      final SessionConfig config,
      final ExecutionPlan executionPlan,
      final Collection<QueryMetadata> runningQueries
  ) {
    validateCacheBytesUsage(
        runningQueries.stream()
            .filter(q -> q instanceof PersistentQueryMetadata)
            .collect(Collectors.toList()),
        config,
        config.getConfig(false)
            .getLong(KsqlConfig.KSQL_TOTAL_CACHE_MAX_BYTES_BUFFERING)
    );
  }
@Test
  public void shouldNotThrowIfUnderLimit() {
    // Given:
    final SessionConfig config = configWithLimits(5, OptionalLong.of(60));

    // When/Then (no throw)
    queryValidator.validateQuery(config, plan, queries);
  }