@Test
public void getNetworkInterfaceAddresses() throws Exception {

    Map<String, Set<InetAddress>> includeLoopback = Hosts.getNetworkInterfaceAddresses(true);
    assertFalse(includeLoopback.isEmpty());
    assertLoopback("Should include loopback", true, includeLoopback);
    Map<String, Set<InetAddress>> noLoopback = Hosts.getNetworkInterfaceAddresses(false);
    assertFalse(noLoopback.isEmpty());
    assertLoopback("Should not include loopback", false, noLoopback);
}