@@ -0,0 +1,2064 @@
+/*%0A * Copyright 2017-2019 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%0Aimport com.example.Application;%0Aimport org.junit.BeforeClass;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0A%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.boot.test.context.SpringBootTest;%0Aimport org.springframework.boot.test.web.client.TestRestTemplate;%0Aimport org.springframework.http.ResponseEntity;%0Aimport org.springframework.test.context.junit4.SpringRunner;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0Aimport static org.hamcrest.Matchers.is;%0Aimport static org.junit.Assume.assumeThat;%0A%0A@RunWith(SpringRunner.class)%0A@SpringBootTest(%0A%09%09webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,%0A%09%09classes = Application.class,%0A%09%09properties = %22application.ocr-bucket=vision-integration-test-bucket%22)%0Apublic class VisionOcrSampleTest %7B%0A%0A%09@Autowired%0A%09private TestRestTemplate testRestTemplate;%0A%0A%09@BeforeClass%0A%09public static void prepare() %7B%0A%09%09assumeThat(%0A%09%09%09%09%22Vision Sample integration tests are disabled. Please use '-Dit.vision=true' %22%0A%09%09%09%09%09%09+ %22to enable them.%22,%0A%09%09%09%09System.getProperty(%22it.vision%22), is(%22true%22));%0A%09%7D%0A%0A%09@Test%0A%09public void testApplicationStartup() %7B%0A%09%09ResponseEntity%3CString%3E response = this.testRestTemplate.getForEntity(%22/%22, String.class);%0A%09%09assertThat(response.getStatusCode().is2xxSuccessful()).isTrue();%0A%0A%09%09response = this.testRestTemplate.getForEntity(%22/status%22, String.class);%0A%09%09assertThat(response.getStatusCode().is2xxSuccessful()).isTrue();%0A%09%7D%0A%7D%0A

Add basic integration test for Vision OCR sample app (#1718)