Add ThrowingLongFunction and tests