@Test
public void checkNullAdress() {

    JndiChangeNotifier spy = Mockito.spy(jndiChangeNotifier);
    Mockito.when(spy.getAddresses()).thenReturn(null);
    spy.check();
    Mockito.verifyZeroInteractions(addressChangeListener);
}