Here you're implementing logic in Scala. Shouldn't this be in RxJava core? Maybe not the whole tail method, because that's Scala specific, but asserting that an Observable contains a certain number of elements is something quite general, so maybe some part of this should go into RxJava core?