@Test
public void testDataChangedWhenNotificationsAreDisabled() {

    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, "testDataTreeChangedNotificationsDisabled");
    subject.tell(new DataTreeChanged(mockCandidates), testKit.getRef());
    testKit.within(Duration.ofSeconds(1), () -> {
        testKit.expectNoMessage();
        verify(mockListener, never()).onDataTreeChanged(anyCollection());
        return null;
    });
}