- def 'Creating a data validation exception for invalid args.'() {
- given: 'a data validation exception is created'
- mockProceedingJoinPoint.getArgs() >> {
- throw new DataValidationException('invalid args',
- 'invalid method arg(s) is passed', new Throwable())
- }
+ def 'Exception thrown during method execution.'() {
+ given: 'some exception is created'
+ mockProceedingJoinPoint.proceed() >> { throw new Exception("some exception") }