PedigreeConverter { static de.charite.compbio.jannovar.pedigree.Pedigree convertToJannovarPedigree(Pedigree pedigree) { logger.debug("Converting pedigree"); ImmutableList<PedPerson> people = pedigree.getIndividuals() .stream() .map(toPedPerson()) .collect(ImmutableList.toImmutableList()); return buildJannovarPedigree(people); } private  PedigreeConverter();   }
@Test public void toJannovar() { Pedigree original = Pedigree.of(ADAM, EVA, SETH, NEMO); de.charite.compbio.jannovar.pedigree.Pedigree converted = PedigreeConverter.convertToJannovarPedigree(original); Person jannovarAdam = new Person("Adam", null, null, Sex.MALE, Disease.UNAFFECTED); Person jannovarEva = new Person("Eva", null, null, Sex.FEMALE, Disease.UNAFFECTED); Person jannovarSeth = new Person("Seth", jannovarAdam, jannovarEva, Sex.MALE, Disease.AFFECTED); Person jannovarNemo = new Person("Nemo", jannovarAdam, jannovarEva, Sex.UNKNOWN, Disease.UNKNOWN); assertThat(converted.getNMembers(), equalTo(original.size())); assertContainsPerson(jannovarAdam, converted); assertContainsPerson(jannovarEva, converted); assertContainsPerson(jannovarSeth, converted); assertContainsPerson(jannovarNemo, converted); }