I believe this is a widespread broken pattern in EagerTestSession and GraphTestSession:
o.asTensor()
.scalars()
.forEachIndexed((idx, f) -> assertTrue(predicate.test(o.asTensor().getFloat())));
Notice that f is ignored in the lambda, and o is referenced directly instead. getFloat then returns the zero'th element of the tensor.
@JimClarke5, am I right here?