Added "getFirstElem2" method and test for it.