Adding tests for first! and last! methods

Adding tests for `first!` and `last!` methods.

@byroot