Added assertion for attribute on method