targetOutputStream.flush();
targetOutputStream.close();
sourceInputStream.close();
//execute nasm
Asm asm = new Asm();
asm.setProject(new Project());
asm.setEnableJNasm(false);
asm.setJnasmCompatibilityEnabled(true);
asm.setSrcdir(workingDirectory);
asm.setDestdir(workingDirectory);
asm.setOutputFormat("bin");
asm.execute();
//compare JNAsm binary with NASM binary
File nasmOutputFile = new File(workingDirectory, NASM_OUTPUT_FILE_NAME);
Assert.assertEquals(nasmOutputFile.length(), jnasmOutputFile.length());
InputStream jnasmBinaryInput = new FileInputStream(jnasmOutputFile);