I have a feature, let's call it F1, which returns one and the same file as two streams:
* def aPdf1 = read('classpath:pdf.pdf')
* def aPdf2 = read('classpath:pdf.pdf')
* def out = { one: aPdf1, two: aPdf2 }
When I call F1 from another feature, let's say F2, and compare the streams, they do not match:
* def out = call read('F1.feature')
* match out.aPdf1 == out.aPdf2
and the error is:
com.intuit.karate.exception.KarateException: unexpected type: class java.io.BufferedInputStream
Is this a bug? Or is it a not yet implemented feature?
PS1: If I add the following line to F1, it completes successfully by itself:
* match aPdf1 == aPdf2
PS2: Utilizing the code from the answer to this question, I was able to match the streams in F2.