[scala] Add tests