### Question:
LinkDatabaseMatchListener extends AbstractMatchListener { public void noMatchFor(Record record) { if (current != null) endRecord_(); startRecord_(record); } LinkDatabaseMatchListener(Configuration config, LinkDatabase linkdb); void matches(Record r1, Record r2, double confidence); void matchesPerhaps(Record r1, Record r2, double confidence); void noMatchFor(Record record); void startRecord_(Record r); void endRecord_(); void batchReady(int size); void batchDone();  }### Answer:
@Test public void testNoMatchFor() { Record r1 = makeRecord("id", "1"); Record r2 = makeRecord("id", "2"); Record r3 = makeRecord("id", "3"); Record r4 = makeRecord("id", "4"); listener.startProcessing(); listener.batchReady(3); listener.matches(r1, r3, 1.0); listener.noMatchFor(r2); listener.matches(r3, r1, 1.0); listener.matches(r3, r4, 1.0); listener.batchDone(); listener.endProcessing(); Link l1 = new Link("1", "3", LinkStatus.INFERRED, LinkKind.SAME, 1.0); Link l2 = new Link("3", "4", LinkStatus.INFERRED, LinkKind.SAME, 1.0); Collection<Link> all = linkdb.getAllLinks(); assertEquals(2, all.size()); assertTrue(all.contains(l1)); assertTrue(all.contains(l2)); }