@Override
    public Addresses loadAddresses(ClientConnectionProcessListenerRegistry listenerRunner)
            throws Exception {
        privateToPublic = getAddresses.call();
        Set<Address> addresses = privateToPublic.keySet();
        listenerRunner.onPossibleAddressesCollected(addresses);
        return new Addresses(addresses);
    }
@Test
    public void testLoadAddresses() throws Exception {
        RemoteAddressProvider provider = new RemoteAddressProvider(() -> expectedAddresses, true);
        Collection<Address> addresses = provider.loadAddresses(createConnectionProcessListenerRunner()).primary();

        assertEquals(3, addresses.size());
        for (Address address : expectedAddresses.keySet()) {
            addresses.remove(address);
        }
        assertTrue(addresses.isEmpty());
    }