added junit tests

added junit tests