public void testGetDeviceFile_with_device_node_unavailable() { try { tunInfo.getDeviceFile(); fail("Expected IllegalStateException"); } catch (IllegalStateException e) { // expected } }
public void testGetDeviceFile_with_device_node_available() { tunInfo.setDeviceNodeAvailable(true); assertEquals(new File("/dev/tun"), tunInfo.getDeviceFile()); }