added Junit tests