package com.pty4j;

import junit.framework.TestCase;
import org.junit.Assert;
import testData.RepeatTextWithTimeout;

import java.io.IOException;

public class FailedToLoadNativePtyLibTest extends TestCase {
  public void testErrorMessage() {
    TestUtil.unsetLocalPtyLib();
    String[] cmd = TestUtil.getJavaCommand(RepeatTextWithTimeout.class, "2", "1000", "Hello, World");
    boolean failed = false;
    try {
      PtyProcess.exec(cmd);
    }
    catch (IOException e) {
      failed = true;
    }
    Assert.assertTrue("Library should fail to load unless 'PTY_LIB_FOLDER' system property is set", failed);
  }
}

@@ -17,41 +17,8 @@
 j;%0A%0A
-import junit.framework.TestCase;%0A
 impo
@@ -30,21 +30,19 @@
 g.junit.
-Asser
+Tes
 t;%0Aimpor
@@ -151,26 +151,48 @@
 est 
-extends TestCase %7B
+%7B%0A%0A  @Test(expected = IOException.class)
 %0A  p
@@ -220,16 +220,35 @@
 essage()
+ throws IOException
  %7B%0A    T
@@ -385,236 +385,26 @@
     
-boolean failed = false;%0A    try %7B%0A      PtyProcess.exec(cmd);%0A    %7D%0A    catch (IOException e) %7B%0A      failed = true;%0A    %7D%0A    Assert.assertTrue(%22Library should fail to load unless 'PTY_LIB_FOLDER' system property is set%22, faile
+PtyProcess.exec(cm
 d);%0A

use JUnit4 syntax to simplify test