Hai friends, please tell me how to write Junit for the below method,
public static FileInputStream readAsFileInputStream(String fileName,String fileLocation) throws IOException
{
FileInputStream fileinputstream = null;
File file = null;
try
{
file = new File(fileLocation,fileName);
fileinputstream = new FileInputStream(file);
}
catch(IOException ex)
{
ex.printStackTrace();
}
finally
{
fileinputstream.close();
}
return fileinputstream;
}
Please help me in this problem,
Thanks.