Removed duplicated code that is in AssertContentTrait