// Path: src/test/java/org/jpy/fixtures/Processor.java
// public interface Processor {
//     String initialize();
// 
//     String computeTile(int w, int h, float[] data);
// 
//     String dispose();
//     
//     void setVal(int n);
//     
//     int getVal();
//     
//     boolean check1234();
// }


import static org.junit.Assert.*;
import org.junit.*;
import org.jpy.fixtures.Processor;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import java.util.concurrent.*;
            assertEquals("dispose", result);
            
            String[] results = new String[] { futures.get(0).get(), futures.get(1).get(), futures.get(2).get(),
                            futures.get(3).get(), };
            
            Arrays.sort(results);
            
            result = results[0];
            assertEquals("computeTile-100,100", result);
            result = results[1];
            assertEquals("computeTile-100,200", result);
            result = results[2];
            assertEquals("computeTile-200,100", result);
            result = results[3];
            assertEquals("computeTile-200,200", result);
            
        } catch (InterruptedException | ExecutionException e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
    }
    
    static void addTestDirToPythonSysPath() throws IOException {
        // Add module dir to sys.path in order to import file 'proc_class.py'
        String importPath = new File("src/test/python/fixtures").getCanonicalPath();
        // System.out.println("importPath = " + importPath);
        PyLib.execScript(String.format("import sys; sys.path.append('%s')", importPath.replace("\\", "\\\\")));
    }
    
    private static class ProcessorTask implements Callable<String> {
// Path: src/test/java/org/jpy/fixtures/Processor.java
// public interface Processor {
//     String initialize();
// 
//     String computeTile(int w, int h, float[] data);
// 
//     String dispose();
//     
//     void setVal(int n);
//     
//     int getVal();
//     
//     boolean check1234();
// }


// Path: src/test/java/org/jpy/PyObjectTest.java
import static org.junit.Assert.*;
import org.junit.*;
import org.jpy.fixtures.Processor;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import java.util.concurrent.*;

            assertEquals("dispose", result);
            
            String[] results = new String[] { futures.get(0).get(), futures.get(1).get(), futures.get(2).get(),
                            futures.get(3).get(), };
            
            Arrays.sort(results);
            
            result = results[0];
            assertEquals("computeTile-100,100", result);
            result = results[1];
            assertEquals("computeTile-100,200", result);
            result = results[2];
            assertEquals("computeTile-200,100", result);
            result = results[3];
            assertEquals("computeTile-200,200", result);
            
        } catch (InterruptedException | ExecutionException e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
    }
    
    static void addTestDirToPythonSysPath() throws IOException {
        // Add module dir to sys.path in order to import file 'proc_class.py'
        String importPath = new File("src/test/python/fixtures").getCanonicalPath();
        // System.out.println("importPath = " + importPath);
        PyLib.execScript(String.format("import sys; sys.path.append('%s')", importPath.replace("\\", "\\\\")));
    }
    
    private static class ProcessorTask implements Callable<String> {
        final Processor processor;