BrokerCfg { public BackpressureCfg getBackpressure() { return backpressure; }  void init(final String brokerBase); void init(final String brokerBase, final Environment environment); NetworkCfg getNetwork(); void setNetwork(final NetworkCfg network); ClusterCfg getCluster(); void setCluster(final ClusterCfg cluster); ThreadsCfg getThreads(); void setThreads(final ThreadsCfg threads); DataCfg getData(); void setData(final DataCfg logs); Map<String, ExporterCfg> getExporters(); void setExporters(final Map<String, ExporterCfg> exporters); EmbeddedGatewayCfg getGateway(); BrokerCfg setGateway(final EmbeddedGatewayCfg gateway); BackpressureCfg getBackpressure(); BrokerCfg setBackpressure(final BackpressureCfg backpressure); Duration getStepTimeout(); void setStepTimeout(final Duration stepTimeout); boolean isExecutionMetricsExporterEnabled(); void setExecutionMetricsExporterEnabled(final boolean executionMetricsExporterEnabled); @Override String toString(); String toJson();  }
@Test public void shouldSetBackpressureConfig() { final BrokerCfg cfg = TestConfigReader.readConfig("backpressure-cfg", environment); final BackpressureCfg backpressure = cfg.getBackpressure(); assertThat(backpressure.isEnabled()).isTrue(); assertThat(backpressure.useWindowed()).isFalse(); assertThat(backpressure.getAlgorithm()).isEqualTo(LimitAlgorithm.GRADIENT); }