@@ -0,0 +1,2091 @@
+/*%0A * Copyright 2020 the original author or authors.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      https://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage org.springframework.cloud.vault.config;%0A%0Aimport org.junit.Test;%0Aimport reactor.core.publisher.Mono;%0Aimport reactor.test.StepVerifier;%0A%0Aimport org.springframework.boot.actuate.health.Health;%0Aimport org.springframework.boot.actuate.health.Status;%0Aimport org.springframework.cloud.vault.util.IntegrationTestSupport;%0Aimport org.springframework.cloud.vault.util.Settings;%0Aimport org.springframework.cloud.vault.util.TestRestTemplateFactory;%0Aimport org.springframework.vault.client.ClientHttpConnectorFactory;%0Aimport org.springframework.vault.core.ReactiveVaultTemplate;%0Aimport org.springframework.vault.support.ClientOptions;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0A%0A/**%0A * Integration tests for %7B@link VaultReactiveHealthIndicator%7D.%0A *%0A * @author Mark Paluch%0A */%0Apublic class VaultReactiveHealthIndicatorIntegrationTests extends IntegrationTestSupport %7B%0A%0A%09@Test%0A%09public void shouldReturnHealthState() %7B%0A%0A%09%09ReactiveVaultTemplate vaultTemplate = new ReactiveVaultTemplate(%0A%09%09%09%09TestRestTemplateFactory.TEST_VAULT_ENDPOINT, ClientHttpConnectorFactory%0A%09%09%09%09.create(new ClientOptions(), Settings%0A%09%09%09%09%09%09.createSslConfiguration()), () -%3E Mono.just(Settings.token()));%0A%0A%09%09VaultReactiveHealthIndicator healthIndicator = new VaultReactiveHealthIndicator(vaultTemplate);%0A%0A%09%09healthIndicator.doHealthCheck(Health.up()).as(StepVerifier::create)%0A%09%09%09%09.consumeNextWith(actual -%3E %7B%0A%09%09%09%09%09assertThat(actual.getStatus()).isEqualTo(Status.UP);%0A%09%09%09%09%7D).verifyComplete();%0A%09%7D%0A%7D%0A

Add integration test for VaultReactiveHealthIndicator