@Test
public void testDataChangedWithNoSender() {

    final DataTreeCandidate mockTreeCandidate = mock(DataTreeCandidate.class);
    final ImmutableList<DataTreeCandidate> mockCandidates = ImmutableList.of(mockTreeCandidate);
    final DOMDataTreeChangeListener mockListener = mock(DOMDataTreeChangeListener.class);
    final Props props = DataTreeChangeListenerActor.props(mockListener, TEST_PATH);
    final ActorRef subject = getSystem().actorOf(props, "testDataTreeChangedWithNoSender");
    getSystem().eventStream().subscribe(testKit.getRef(), DeadLetter.class);
    subject.tell(new DataTreeChanged(mockCandidates), ActorRef.noSender());
    // Make sure no DataChangedReply is sent to DeadLetters.
    while (true) {
        DeadLetter deadLetter;
        try {
            deadLetter = testKit.expectMsgClass(Duration.ofSeconds(1), DeadLetter.class);
        } catch (AssertionError e) {
            // Timed out - got no DeadLetter - this is good
            break;
        }
        // We may get DeadLetters for other messages we don't care
        // about.
        assertFalse("Unexpected DataTreeChangedReply", deadLetter.message() instanceof DataTreeChangedReply);
    }
}