@Test
public void testBindToLocalAddress() throws Exception {

  assertNotNull(NetUtils
      .bindToLocalAddress(NetUtils.getLocalInetAddress("127.0.0.1"), false));
  assertNull(NetUtils
      .bindToLocalAddress(NetUtils.getLocalInetAddress("127.0.0.1"), true));
}