@Test
public void testDataChangedWithListenerRuntimeEx() {

    final DataTreeCandidate mockTreeCandidate1 = mock(DataTreeCandidate.class);
    final ImmutableList<DataTreeCandidate> mockCandidates1 = ImmutableList.of(mockTreeCandidate1);
    final DataTreeCandidate mockTreeCandidate2 = mock(DataTreeCandidate.class);
    final ImmutableList<DataTreeCandidate> mockCandidates2 = ImmutableList.of(mockTreeCandidate2);
    final DataTreeCandidate mockTreeCandidate3 = mock(DataTreeCandidate.class);
    final ImmutableList<DataTreeCandidate> mockCandidates3 = ImmutableList.of(mockTreeCandidate3);
    final DOMDataTreeChangeListener mockListener = mock(DOMDataTreeChangeListener.class);
    doThrow(new RuntimeException("mock")).when(mockListener).onDataTreeChanged(mockCandidates2);
    Props props = DataTreeChangeListenerActor.props(mockListener, TEST_PATH);
    ActorRef subject = getSystem().actorOf(props, "testDataTreeChangedWithListenerRuntimeEx");
    // Let the DataChangeListener know that notifications should be
    // enabled
    subject.tell(new EnableNotification(true, "test"), testKit.getRef());
    subject.tell(new DataTreeChanged(mockCandidates1), testKit.getRef());
    testKit.expectMsgClass(DataTreeChangedReply.class);
    subject.tell(new DataTreeChanged(mockCandidates2), testKit.getRef());
    testKit.expectMsgClass(DataTreeChangedReply.class);
    subject.tell(new DataTreeChanged(mockCandidates3), testKit.getRef());
    testKit.expectMsgClass(DataTreeChangedReply.class);
    verify(mockListener).onDataTreeChanged(mockCandidates1);
    verify(mockListener).onDataTreeChanged(mockCandidates2);
    verify(mockListener).onDataTreeChanged(mockCandidates3);
}