SpringGatewayBridge { public Optional<Status> getGatewayStatus() { if (gatewayStatusSupplier != null) { return Optional.of(gatewayStatusSupplier.get()); } else { return Optional.empty(); } }  void registerGatewayStatusSupplier(Supplier<Status> gatewayStatusSupplier); void registerClusterStateSupplier(Supplier<BrokerClusterState> clusterStateSupplier); Optional<Status> getGatewayStatus(); Optional<BrokerClusterState> getClusterState();  }
@Test public void shouldReturnNoGatewayStatusByDefault() { final Optional<Status> actual = sutBrigde.getGatewayStatus(); assertThat(actual).describedAs("Gateway status when no supplier is set").isEmpty(); }