Added Junit tests, reverse method