method constraints demo.