added a JUnit test for a further scenarion for adding, removing and then re-adding the first element in a list
fixed the bug which causes a null pointer exception when removing the head of the list