Implement and add Unit Test for functions "PriorElem" and "NextElem".