### Question:
EmpiMatchLinkSvc { public EmpiTransactionContext updateEmpiLinksForEmpiTarget(IAnyResource theResource, EmpiTransactionContext theEmpiTransactionContext) { if (EmpiUtil.isEmpiAccessible(theResource)) { return doEmpiUpdate(theResource, theEmpiTransactionContext); } else { return null; } }  EmpiTransactionContext updateEmpiLinksForEmpiTarget(IAnyResource theResource, EmpiTransactionContext theEmpiTransactionContext);  }### Answer:
@Test public void testWhenMatchOccursOnPersonThatHasBeenManuallyNOMATCHedThatItIsBlocked() { Patient originalJane = createPatientAndUpdateLinks(buildJanePatient()); IBundleProvider search = myPersonDao.search(new SearchParameterMap()); IAnyResource janePerson = (IAnyResource) search.getResources(0, 1).get(0); Patient unmatchedJane = createPatient(buildJanePatient()); myEmpiLinkSvc.updateLink(janePerson, unmatchedJane, EmpiMatchOutcome.NO_MATCH, EmpiLinkSourceEnum.MANUAL, createContextForCreate()); myEmpiMatchLinkSvc.updateEmpiLinksForEmpiTarget(unmatchedJane, createContextForCreate()); assertThat(unmatchedJane, is(not(samePersonAs(janePerson)))); assertThat(unmatchedJane, is(not(linkedTo(originalJane)))); assertLinksMatchResult(MATCH, NO_MATCH, MATCH); assertLinksNewPerson(true, false, true); assertLinksMatchedByEid(false, false, false); }
@Test public void testWhenPOSSIBLE_MATCHOccursOnPersonThatHasBeenManuallyNOMATCHedThatItIsBlocked() { Patient originalJane = createPatientAndUpdateLinks(buildJanePatient()); IBundleProvider search = myPersonDao.search(new SearchParameterMap()); IAnyResource janePerson = (IAnyResource) search.getResources(0, 1).get(0); Patient unmatchedPatient = createPatient(buildJanePatient()); myEmpiLinkSvc.updateLink(janePerson, unmatchedPatient, EmpiMatchOutcome.NO_MATCH, EmpiLinkSourceEnum.MANUAL, createContextForCreate()); myEmpiMatchLinkSvc.updateEmpiLinksForEmpiTarget(unmatchedPatient, createContextForCreate()); assertThat(unmatchedPatient, is(not(samePersonAs(janePerson)))); assertThat(unmatchedPatient, is(not(linkedTo(originalJane)))); assertLinksMatchResult(MATCH, NO_MATCH, MATCH); assertLinksNewPerson(true, false, true); assertLinksMatchedByEid(false, false, false); }