public static boolean exceedsPushQueryCapacity(
          final KsqlExecutionContext executionContext,
          final KsqlRestConfig ksqlRestConfig
  ) {
    return getNumLivePushQueries(executionContext) >= getPushQueryLimit(ksqlRestConfig);
  }
@Test
  public void shouldReportPushQueryCapacityExceededIfOverLimit() {
    // Given:
    givenAllLiveQueries(10);
    givenActivePersistentQueries(4);
    givenPushQueryLimit(3);

    // Then:
    assertThat(QueryCapacityUtil.exceedsPushQueryCapacity(ksqlEngine, ksqlRestConfig),
            equalTo(true));
  }