public static Collection<Inet6Address> getPossibleInetAddressesFor(final Inet6Address inet6Address) {
        if ((!inet6Address.isSiteLocalAddress() && !inet6Address.isLinkLocalAddress())
                || inet6Address.getScopeId() > 0 || inet6Address.getScopedInterface() != null) {
            return Collections.singleton(inet6Address);
        }

        LinkedList<Inet6Address> possibleAddresses = new LinkedList<>();
        try {
            List<NetworkInterfaceInfo> interfaces = networkInterfacesEnumerator.getNetworkInterfaces();
            for (NetworkInterfaceInfo ni : interfaces) {
                addPossibleAddress(inet6Address, possibleAddresses, ni);
            }
        } catch (IOException ignored) {
            ignore(ignored);
        }

        if (possibleAddresses.isEmpty()) {
            throw new IllegalArgumentException("Could not find a proper network interface"
                    + " to connect to "
                    + inet6Address);
        }
        return possibleAddresses;
    }
@Test
    public void testGetPossibleInetAddressesFor_whenNotLocalAddress() throws UnknownHostException {
        Inet6Address inet6Address = (Inet6Address) Inet6Address.getByName(SOME_NOT_LOCAL_ADDRESS);
        assertThat(inet6Address.isSiteLocalAddress()).isFalse();
        assertThat(inet6Address.isLinkLocalAddress()).isFalse();

        Collection<Inet6Address> actual = AddressUtil.getPossibleInetAddressesFor(inet6Address);
        assertEquals(1, actual.size());
        assertTrue(actual.contains(inet6Address));
    }