@@ -0,0 +1,2922 @@
+package org.cbioportal.genome_nexus.web;%0A%0Aimport com.fasterxml.jackson.databind.ObjectMapper;%0Aimport org.cbioportal.genome_nexus.model.GeneXref;%0Aimport org.cbioportal.genome_nexus.model.my_variant_info_model.MyVariantInfo;%0Aimport org.cbioportal.genome_nexus.service.annotation.EntrezGeneXrefResolver;%0Aimport org.cbioportal.genome_nexus.web.mixin.GeneXrefMixin;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.boot.test.context.SpringBootTest;%0Aimport org.springframework.http.converter.HttpMessageConverter;%0Aimport org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;%0Aimport org.springframework.test.context.junit4.SpringJUnit4ClassRunner;%0Aimport org.springframework.web.client.RestTemplate;%0A%0Aimport java.util.*;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertNotNull;%0A%0A@RunWith(SpringJUnit4ClassRunner.class)%0A@SpringBootTest(%0A    webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT,%0A    properties = %7B%0A        %22spring.data.mongodb.uri=mongodb://localhost/integration%22,%0A        %22server.port=38892%22%0A    %7D%0A)%0Apublic class MyVariantInfoIntegrationTest%0A%7B%0A    private final static String BASE_URL = %22http://localhost:38892/my_variant_info/variant/%22;%0A%0A    private RestTemplate restTemplate = new RestTemplate();%0A%0A    private MyVariantInfo fetchMyVariantInfoAnnotationGET(String variant)%0A    %7B%0A        return this.restTemplate.getForObject(BASE_URL + variant, MyVariantInfo.class);%0A    %7D%0A    private MyVariantInfo%5B%5D fetchMyVariantInfoAnnotationPOST(String%5B%5D variants)%0A    %7B%0A        return this.restTemplate.postForObject(BASE_URL, variants, MyVariantInfo%5B%5D.class);%0A    %7D%0A%0A%0A    @Test%0A    public void testMyVariantInfoAnnotation()%0A    %7B%0A        String%5B%5D variants = %7B%0A            %227:g.140453136A%3ET%22,%0A            %22rs12190874%22,%0A            %22INVALID%22%0A        %7D;%0A%0A        //////////////////%0A        // GET requests //%0A        //////////////////%0A%0A        MyVariantInfo ann0 = this.fetchMyVariantInfoAnnotationGET(variants%5B0%5D);%0A        // mutdb annotation should be 7%0A        assertEquals(%227%22, ann0.getMutdb().getChrom());%0A%0A        MyVariantInfo ann1 = this.fetchMyVariantInfoAnnotationGET(variants%5B1%5D);%0A        // mutdb annotation should be 7%0A        assertEquals(%22rs12190874%22, ann1.getDbsnp().getRsid());%0A%0A        //////////////////%0A        // POST request //%0A        //////////////////%0A%0A        MyVariantInfo%5B%5D anns = this.fetchMyVariantInfoAnnotationPOST(variants);%0A%0A        // for each pdbId we should have one matching PdbHeader instance, except the invalid one%0A        assertEquals(anns.length, variants.length - 1);%0A%0A        // GET and POST requests should return the same%0A        assertEquals(anns%5B0%5D.getMutdb().getChrom(), ann0.getMutdb().getChrom());%0A        assertEquals(anns%5B1%5D.getDbsnp().getRsid(), ann1.getDbsnp().getRsid());%0A    %7D%0A%7D%0A

add myvariantinfo integration test