Method to test the statuscodes