Added some junit tests.