@@ -0,0 +1,2361 @@
+package org.cbioportal.genome_nexus.web;%0A%0Aimport org.cbioportal.genome_nexus.model.VariantAnnotation;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.springframework.boot.test.context.SpringBootTest;%0Aimport org.springframework.test.context.junit4.SpringJUnit4ClassRunner;%0Aimport org.springframework.web.client.RestTemplate;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0A@RunWith(SpringJUnit4ClassRunner.class)%0A@SpringBootTest(%0A    webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT,%0A    properties = %7B%0A        %22vep.url=http://grch37.rest.ensembl.org/vep/human/hgvs/VARIANT?content-type=application/json&xref_refseq=1&ccds=1&canonical=1&domains=1&hgvs=1&numbers=1&protein=1%22,%0A        %22spring.data.mongodb.uri=mongodb://localhost/integration%22,%0A        %22server.port=38891%22%0A    %7D%0A)%0Apublic class VEPIdIntegrationTest%0A%7B%0A    private final static String BASE_URL = %22http://localhost:38891/annotation/id/%22;%0A%0A    private RestTemplate restTemplate = new RestTemplate();%0A%0A    private VariantAnnotation fetchVariantAnnotationByIdGET(String variantId)%0A    %7B%0A        return this.restTemplate.getForObject(BASE_URL + variantId, VariantAnnotation.class);%0A    %7D%0A%0A    private VariantAnnotation%5B%5D fetchVariantAnnotationsByIdsPOST(String%5B%5D variantIds)%0A    %7B%0A        return this.restTemplate.postForObject(BASE_URL, variantIds, VariantAnnotation%5B%5D.class);%0A    %7D%0A%0A    @Test%0A    public void testVariantAnnotationById()%0A    %7B%0A        String%5B%5D dbSNPIds = %7B%0A            %22rs116035550%22,%0A            %22rs1333049%22,%0A            %22asdas%22%0A        %7D;%0A%0A        //////////////////%0A        // GET requests //%0A        //////////////////%0A%0A        VariantAnnotation ann0 = this.fetchVariantAnnotationByIdGET(dbSNPIds%5B0%5D);%0A%0A        assertEquals(dbSNPIds%5B0%5D, ann0.getVariantId());%0A%0A        //////////////////%0A        // POST request //%0A        //////////////////%0A%0A        VariantAnnotation%5B%5D anns = this.fetchVariantAnnotationsByIdsPOST(dbSNPIds);%0A%0A        // for each dbsnpid we should have one matching variantannotation%0A        // instance, except the invalid one%0A        assertEquals(dbSNPIds.length, anns.length - 1);%0A%0A        // GET and POST requests should return exact same dbsnp ids%0A        assertEquals(dbSNPIds%5B0%5D, anns%5B0%5D.getVariantId());%0A        assertEquals(dbSNPIds%5B1%5D, anns%5B1%5D.getVariantId());%0A        assertEquals(dbSNPIds%5B2%5D, anns%5B2%5D.getVariantId());%0A    %7D%0A%7D%0A

add vep by dbspid integration test