Clean up assert method in test cases from status message to status code.