package ericwu.notes;

import java.nio.file.InvalidPathException;
import java.nio.file.Paths;

import org.apache.commons.lang3.SystemUtils;
import org.junit.Test;

/**
 * Tests Path behavior different on different operating systems.
 */
public class PathOsTest {

    @Test ( expected = InvalidPathException.class )
    public void testGetSpaceAsPathWindows() {
        if ( SystemUtils.IS_OS_WINDOWS ) {
            Paths.get( " " );
        }
    }

    @Test
    public void testGetSpaceAsPathLinux() {
        if ( SystemUtils.IS_OS_LINUX) {
            Paths.get( " " );
        }
    }
}

@@ -12,24 +12,105 @@
 cwu.notes;%0A%0A
+import static org.junit.Assert.assertTrue;%0Aimport static org.junit.Assert.fail;%0A%0A
 import java.
@@ -140,16 +140,16 @@
 eption;%0A
-
 import j
@@ -351,50 +351,8 @@
 Test
- ( expected = InvalidPathException.class )
 %0A   
@@ -433,24 +433,46 @@
 WINDOWS ) %7B%0A
+            try %7B%0A    
             
@@ -481,32 +481,177 @@
 ths.get( %22 %22 );%0A
+                fail();%0A            %7D catch ( InvalidPathException e ) %7B%0A                assertTrue( %22Expected exception%22, true );%0A            %7D%0A
         %7D%0A    %7D%0A
@@ -701,24 +701,24 @@
 thLinux() %7B%0A
-
         if (
@@ -741,16 +741,17 @@
 OS_LINUX
+ 
 ) %7B%0A    

Fix expected exception