You are comparing a Option[Long] to an Option[Integer] with each of these. I would recommend that you do either,

````
foo.referencePosition(0) == Some(1000L) 
````
or

````
foo.referencePositions(0).get == 1000
````