Method findMethod(ProceedingJoinPoint pjp) {
    Class<?> clazz = pjp.getTarget().getClass();
    Signature pjpSignature = pjp.getSignature();
    String methodName = pjp.getSignature().getName();
    Class[] parameterTypes = null;
    if (pjpSignature instanceof MethodSignature) {
      parameterTypes = ((MethodSignature) pjpSignature).getParameterTypes();
    }
    try {
      Method method = ReflectUtils.findDeclaredMethod(clazz, methodName, parameterTypes);
      return method;
    } catch (NoSuchMethodException e) {
      return null;
    }
  }
@Test
  public void testFindMethod() throws NoSuchMethodException {
    ProceedingJoinPoint mockPJP = mock(ProceedingJoinPoint.class);
    MockAuditClass mockAuditClass = new MockAuditClass();
    MethodSignature signature = mock(MethodSignature.class);
    Method method = MockAuditClass.class.getMethod("mockAuditMethod", Object.class, Object.class);
    Method sameNameMethod = MockAuditClass.class.getMethod("mockAuditMethod", Object.class);
    {
      when(mockPJP.getTarget()).thenReturn(mockAuditClass);
      when(mockPJP.getSignature()).thenReturn(signature);
      when(signature.getName()).thenReturn("mockAuditMethod");
      when(signature.getParameterTypes()).thenReturn(new Class[]{Object.class, Object.class});
    }
    Method methodFounded = aspect.findMethod(mockPJP);

    assertEquals(method, methodFounded);
    assertNotEquals(sameNameMethod, methodFounded);
  }