package gov.nih.nci.evs.api;

import static org.assertj.core.api.Assertions.assertThat;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.context.ApplicationContext;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
public class ApplicationTests {

    /** The logger. */
    private static final Logger log = LoggerFactory.getLogger(ApplicationTests.class);

    @Autowired
    ApplicationContext context;

    @Test
    public void contextLoads() {
        assertThat(this.context).isNotNull();
        log.debug("context loaded successfully");
    }

}

@@ -1,8 +1,9 @@
+%0A
 package 
@@ -82,16 +82,121 @@
 rtThat;%0A
+import static org.junit.Assert.assertTrue;%0A%0Aimport java.io.File;%0A%0Aimport org.apache.commons.io.FileUtils;
 %0Aimport 
@@ -741,18 +741,16 @@
 ests %7B%0A%0A
-  
   /** Th
@@ -762,18 +762,16 @@
 ger. */%0A
-  
   privat
@@ -848,18 +848,16 @@
 lass);%0A%0A
-  
   @Autow
@@ -861,18 +861,16 @@
 towired%0A
-  
   Applic
@@ -896,18 +896,16 @@
 t;%0A%0A
-  
   @Test%0A
     
@@ -900,18 +900,16 @@
   @Test%0A
-  
   public
@@ -935,20 +935,16 @@
 ) %7B%0A    
-   
- 
 assertTh
@@ -981,59 +981,992 @@
     
-    log.debug(%22context loaded successfully%22);%0A    %7D%0A
+log.debug(%22context loaded successfully%22);%0A  %7D%0A%0A  /**%0A   * Test version.%0A   *%0A   * @throws Exception the exception%0A   */%0A  @Test%0A  public void testVersion() throws Exception %7B%0A    // Verify that the build.gradle version matches the version in%0A    // VersionController%0A%0A    final File bgf = new File(%22build.gradle%22);%0A    final File vcf =%0A        new File(%22src/main/java/gov/nih/nci/evs/api/controller/VersionController.java%22);%0A    assertTrue(bgf.exists());%0A    final String version =%0A        FileUtils.readLines(bgf, %22UTF-8%22).stream().filter(s -%3E s.matches(%22%5Eversion =.*%22))%0A            .map(s -%3E s.replaceFirst(%22version = %22, %22%22)).findFirst().get();%0A    assertTrue(vcf.exists());%0A%0A    final boolean flag = FileUtils.readLines(vcf, %22UTF-8%22).stream()%0A        .filter(s -%3E s.contains(%22%5C%22%22 + version + %22%5C%22%22)).count() %3E 0;%0A    if (!flag) %7B%0A      log.error(%22Unexpected mismatch between build.gradle version and VersionController verion = %22%0A          + version);%0A    %7D%0A    assertTrue(!flag);%0A  %7D
 %0A%7D%0A

add a test to verify the version matches between build.gradle and VersionController.java