@@ -0,0 +1,1798 @@
+package org.pdxfinder.integration;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.pdxfinder.BaseTest;%0Aimport org.pdxfinder.graph.dao.Group;%0Aimport org.pdxfinder.graph.dao.Patient;%0Aimport org.pdxfinder.graph.dao.PatientSnapshot;%0Aimport org.pdxfinder.graph.repositories.GroupRepository;%0Aimport org.pdxfinder.graph.repositories.PatientRepository;%0Aimport org.pdxfinder.graph.repositories.PatientSnapshotRepository;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0A%0Apublic class PatientIntegrationTest extends BaseTest %7B%0A%0A    @Autowired%0A    PatientRepository patientRepository;%0A%0A    @Autowired%0A    PatientSnapshotRepository patientSnapshotRepository;%0A%0A    @Autowired%0A    GroupRepository groupRepository;%0A%0A%0A    @Before%0A    public void setupDB()%7B%0A%0A        patientRepository.deleteAll();%0A        patientSnapshotRepository.deleteAll();%0A        groupRepository.deleteAll();%0A%0A        Group providerGroup = new Group(%22testgroup%22, %22tg%22, %22groupdescription%22, %22academia%22, %22%22, %22%22);%0A%0A        Patient p = new Patient(%22p1%22, %22male%22, %22-%22, %22-%22, providerGroup);%0A%0A        PatientSnapshot ps1 = new PatientSnapshot();%0A        ps1.setAgeAtCollection(%2240%22);%0A%0A        PatientSnapshot ps2 = new PatientSnapshot();%0A        ps2.setAgeAtCollection(%2245%22);%0A%0A        p.addSnapshot(ps1);%0A        p.addSnapshot(ps2);%0A%0A        patientRepository.save(p);%0A%0A    %7D%0A%0A    @Test%0A    public void PatientTest()%7B%0A%0A%0A        Group g = groupRepository.findByAbbrevAndType(%22tg%22, %22Provider%22);%0A        Patient p = patientRepository.findByExternalIdAndGroup(%22p1%22, g);%0A%0A        Assert.assertEquals(p.getExternalId(), %22p1%22);%0A        Assert.assertEquals(p.getProviderGroup().getAbbreviation(), g.getAbbreviation());%0A        Assert.assertEquals(p.getLastSnapshot().getAgeAtCollection(), %2245%22);%0A%0A    %7D%0A%0A%0A%0A%7D%0A

Add patient integration test