@Test public void testGetRelationsForIntygOneParentInIT() { when(listRelationsForCertificateResponderInterface.listRelationsForCertificate(isNull(), any(ListRelationsForCertificateType.class))).thenReturn(buildResponseWithParent()); Relations relationsForIntyg = testee.getRelationsForIntyg(INTYG_ID); assertNotNull(relationsForIntyg); assertEquals(PARENT_INTYG_1, relationsForIntyg.getParent().getIntygsId()); assertFrontendRelations(relationsForIntyg.getLatestChildRelations(), null, null, null, null); }
@Override public Relations getRelationsForIntyg(String intygId) { Relations certificateRelations = new Relations(); ListRelationsForCertificateResponseType response = getRelationsFromIntygstjanst(intygId); response.getIntygRelation().stream() .flatMap(ir -> ir.getRelation().stream()) .forEach(r -> applyRelation(intygId, certificateRelations, r)); Relations webcertRelations = certificateRelationService.getRelations(intygId); mergeRelations(certificateRelations, webcertRelations); return certificateRelations; }
IntygRelationHelperImpl implements IntygRelationHelper { @Override public Relations getRelationsForIntyg(String intygId) { Relations certificateRelations = new Relations(); ListRelationsForCertificateResponseType response = getRelationsFromIntygstjanst(intygId); response.getIntygRelation().stream() .flatMap(ir -> ir.getRelation().stream()) .forEach(r -> applyRelation(intygId, certificateRelations, r)); Relations webcertRelations = certificateRelationService.getRelations(intygId); mergeRelations(certificateRelations, webcertRelations); return certificateRelations; } }
IntygRelationHelperImpl implements IntygRelationHelper { @Override public Relations getRelationsForIntyg(String intygId) { Relations certificateRelations = new Relations(); ListRelationsForCertificateResponseType response = getRelationsFromIntygstjanst(intygId); response.getIntygRelation().stream() .flatMap(ir -> ir.getRelation().stream()) .forEach(r -> applyRelation(intygId, certificateRelations, r)); Relations webcertRelations = certificateRelationService.getRelations(intygId); mergeRelations(certificateRelations, webcertRelations); return certificateRelations; }  }
IntygRelationHelperImpl implements IntygRelationHelper { @Override public Relations getRelationsForIntyg(String intygId) { Relations certificateRelations = new Relations(); ListRelationsForCertificateResponseType response = getRelationsFromIntygstjanst(intygId); response.getIntygRelation().stream() .flatMap(ir -> ir.getRelation().stream()) .forEach(r -> applyRelation(intygId, certificateRelations, r)); Relations webcertRelations = certificateRelationService.getRelations(intygId); mergeRelations(certificateRelations, webcertRelations); return certificateRelations; }  @Override Relations getRelationsForIntyg(String intygId); @Override void decorateIntygListWithRelations(List<ListIntygEntry> fullIntygItemList); }
IntygRelationHelperImpl implements IntygRelationHelper { @Override public Relations getRelationsForIntyg(String intygId) { Relations certificateRelations = new Relations(); ListRelationsForCertificateResponseType response = getRelationsFromIntygstjanst(intygId); response.getIntygRelation().stream() .flatMap(ir -> ir.getRelation().stream()) .forEach(r -> applyRelation(intygId, certificateRelations, r)); Relations webcertRelations = certificateRelationService.getRelations(intygId); mergeRelations(certificateRelations, webcertRelations); return certificateRelations; }  @Override Relations getRelationsForIntyg(String intygId); @Override void decorateIntygListWithRelations(List<ListIntygEntry> fullIntygItemList);  }