added test for attack method