ProceedingJoinPoint joinPoint = createMock(ProceedingJoinPoint.class);
expect(joinPoint.getSignature()).andReturn(methodSignature);
expect(joinPoint.getTarget()).andReturn(service);
expect(joinPoint.getArgs()).andReturn(joinPointArgs);
expect(joinPoint.proceed()).andReturn(expectedMethod.invoke(service, argument));
replay(joinPoint);
Lock lock = new ReentrantLock();
expect(lockService.borrowLock(expectedDiscriminator, expectedId)).andReturn(lock);
lockService.returnLock(lock);