Extracted assertion logic to private method to cleanup test.