BusinessGlobalTransactionAspect { @Pointcut("@annotation(io.kermoss.trx.app.annotation.CommitBusinessGlobalTransactional)") public void commitLocalTransactionPointcut(){ throw new PoincutDefinitionException(); } BusinessGlobalTransactionAspect(BusinessGlobalTransactionManager businessTransactionManager, ApplicationEventPublisher applicationEventPublisher); @Pointcut("@annotation(io.kermoss.trx.app.annotation.BusinessGlobalTransactional)") void globalTransactionPointcut(); @Pointcut("@annotation(io.kermoss.trx.app.annotation.CommitBusinessGlobalTransactional)") void commitLocalTransactionPointcut(); @Around("globalTransactionPointcut()") void beginLocalTransaction(ProceedingJoinPoint pjp); @Around("commitLocalTransactionPointcut()") void moveLocalTransaction(ProceedingJoinPoint pjp);  }
@Test(expected = PoincutDefinitionException.class) public void testCommitLocalTransactionPointcut() { businessGlobalTransactionAspectUnderTest.commitLocalTransactionPointcut(); }