Rajapaksa struck an unbeaten 71 off 45 balls and Hasaranga scored 36 off 21 balls to take Sri Lanka to a fighting total