This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am testing a function that create a fileOutputStream in the body of the function.
This the simple example I wrote just to show my problem.
Here is my class:
Using EasyMock I test this way
I am getting an assertionError because 2 differents FileOutputStream are getting created. This make sense to me, but I am not sure how to sole this issue.
Any help would be appreciated. Aslo I cannot pass the fileoutputstream to the getFileName() function because that interface is already defined and I can changed it...