public void testGetTunLoader_with_none_defined() {
   try {
     tunInfo.getTunLoader();
     fail("Expected IllegalStateException");
   } catch (IllegalStateException e) {
     // expected
   }
 }
 public void testGetDeviceFile_with_device_node_unavailable() {
   try {
     tunInfo.getDeviceFile();
     fail("Expected IllegalStateException");
   } catch (IllegalStateException e) {
     // expected
   }
 }
 public void testGetTunLoader() {
   DummyTunLoader tunLoader = new DummyTunLoader();
   tunInfo.setTunLoader(tunLoader);
   assertSame(tunLoader, tunInfo.getTunLoader());
 }
 public void testHasTunLoader() {
   tunInfo.setTunLoader(new DummyTunLoader());
   assertTrue(tunInfo.hasTunLoader());
 }
 public void testGetDeviceFile_with_device_node_available() {
   tunInfo.setDeviceNodeAvailable(true);
   assertEquals(new File("/dev/tun"), tunInfo.getDeviceFile());
 }
 public void testIsDeviceNodeAvailable() {
   tunInfo.setDeviceNodeAvailable(true);
   assertTrue(tunInfo.isDeviceNodeAvailable());
 }