add junit tests.