@@ -0,0 +1,2073 @@
+package org.pdxi.repositories;%0A%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.pdxi.TestConfig;%0Aimport org.pdxi.dao.TumorType;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.boot.test.context.SpringBootTest;%0Aimport org.springframework.test.annotation.Rollback;%0Aimport org.springframework.test.context.ContextConfiguration;%0Aimport org.springframework.test.context.TestPropertySource;%0Aimport org.springframework.test.context.junit4.SpringJUnit4ClassRunner;%0Aimport org.springframework.test.context.transaction.BeforeTransaction;%0Aimport org.springframework.transaction.annotation.Transactional;%0A%0Aimport java.util.Arrays;%0Aimport java.util.List;%0A%0A/**%0A * Created by jmason on 09/01/2017.%0A */%0A%0A@RunWith(SpringJUnit4ClassRunner.class)%0A@ContextConfiguration(classes = %7BTestConfig.class%7D)%0A@TestPropertySource(locations = %7B%22classpath:ogm.properties%22%7D)%0A@Transactional%0A@SpringBootTest%0Apublic class TumorTypeRepositoryTest %7B%0A%0A    private final static Logger log = LoggerFactory.getLogger(TumorTypeRepositoryTest.class);%0A%0A    @Autowired%0A    TumorTypeRepository tumorTypeRepository;%0A%0A    @Rollback(false)%0A    @BeforeTransaction%0A    public void cleanDb() %7B%0A        tumorTypeRepository.deleteAll();%0A    %7D%0A%0A    @Test%0A    public void createTumorTypesInGraphDb() throws Exception %7B%0A%0A        List%3CString%3E types = Arrays.asList(%22Metastasis%22, %22Metastatic%22, %22Not Specified%22, %22Primary Malignancy%22, %22Recurrent/Relapse%22);%0A%0A        for (String type : types) %7B%0A            TumorType foundType = tumorTypeRepository.findByName(type);%0A            if (foundType == null) %7B%0A                log.info(%22Tumor type %22, type, %22not found. Creating%22);%0A                foundType = new TumorType(type);%0A                tumorTypeRepository.save(foundType);%0A            %7D%0A%0A            foundType = tumorTypeRepository.findByName(type);%0A            log.info(%22Found Tumor type %22, type);%0A%0A            assert (foundType != null);%0A            assert (foundType.getName().equals(type));%0A%0A        %7D%0A%0A    %7D%0A%0A%7D

Add TumorType unit test