adding junit tests
implement the recommendations of the code review @ 31.08.14