### Question:
ECLMultiDomainDBCursor implements DBCursor<UpdateMsg> { public boolean shouldReInitialize() { for (DN domainDN : eclDisabledDomains) { if (predicate.isECLEnabledDomain(domainDN)) { eclDisabledDomains.clear(); return true; } } return false; } ECLMultiDomainDBCursor(ECLEnabledDomainPredicate predicate, MultiDomainDBCursor cursor); @Override UpdateMsg getRecord(); DN getData(); void removeDomain(DN baseDN); boolean shouldReInitialize(); @Override boolean next(); @Override void close(); @Override String toString();  }### Answer:
@Test(dependsOnMethods = { "testECLEnabledDomainWithCursor", "testECLDisabledDomainWithCursor" }) public void testECLEnabledAndDisabledDomainCursors() throws Exception { final DN baseDN1 = DN.valueOf("dc=example,dc=com"); final DN baseDN2 = DN.valueOf("cn=admin data"); eclEnabledDomains.add(baseDN1); final UpdateMsg msgs[] = newUpdateMsgs(13); addDomainCursorToCursor(baseDN1, new SequentialDBCursor(msgs[0], msgs[3])); addDomainCursorToCursor(baseDN2, new SequentialDBCursor(msgs[1], msgs[2])); assertMessagesInOrder(baseDN1, msgs[0], msgs[3]); assertEmpty(); addDomainCursorToCursor(baseDN1, new SequentialDBCursor(msgs[4])); addDomainCursorToCursor(baseDN2, new SequentialDBCursor(msgs[5], msgs[6])); assertMessagesInOrder(baseDN1, msgs[4], null); assertEmpty(); final DN baseDN3 = DN.valueOf("dc=example,dc=net"); addDomainCursorToCursor(baseDN1, new SequentialDBCursor(msgs[7], msgs[9])); addDomainCursorToCursor(baseDN2, new SequentialDBCursor(msgs[8], msgs[10])); addDomainCursorToCursor(baseDN3, new SequentialDBCursor(msgs[11], msgs[12])); assertMessagesInOrder(baseDN1, msgs[7], msgs[9]); assertEmpty(); eclEnabledDomains.add(baseDN3); assertThat(eclCursor.shouldReInitialize()).isTrue(); assertThat(eclCursor.shouldReInitialize()).isFalse(); }