@Override
    public Addresses loadAddresses(ClientConnectionProcessListenerRegistry listenerRunner)
            throws Exception {
        privateToPublic = getAddresses.call();
        Set<Address> addresses = privateToPublic.keySet();
        listenerRunner.onPossibleAddressesCollected(addresses);
        return new Addresses(addresses);
    }
@Test(expected = IllegalStateException.class)
    public void testLoadAddresses_whenExceptionIsThrown() throws Exception {
        RemoteAddressProvider provider = new RemoteAddressProvider(() -> {
            throw new IllegalStateException("Expected exception");
        }, true);

        provider.loadAddresses(createConnectionProcessListenerRunner());
    }