public static void assumeNetworking(){
  try {
    Enumeration<NetworkInterface> ifaces=NetworkInterface.getNetworkInterfaces();
    assumeThat(ifaces,is(notNullValue()));
    assumeTrue(ifaces.hasMoreElements());
  }
 catch (  SocketException ex) {
    assumeNoException(ex);
  }
}

public static void assumeNetworking ( ) { try { Enumeration < NetworkInterface > ifaces = NetworkInterface . getNetworkInterfaces ( ) ; assumeThat ( ifaces , is ( notNullValue ( ) ) ) ; assumeTrue ( ifaces . hasMoreElements ( ) ) ; } catch ( SocketException ex ) { assumeNoException ( ex ) ; } }
if called on a networkless runtime , the test will halt and be ignored .
