Swansea City ensured that they ended the season on a high with a 3-1 victory over in-form Sunderland at the Stadium of Light.