@Nullable
  private static PsiMethodCallExpression getLastMethodCall(PsiStatement[] statements) {
    PsiExpressionStatement expressionStatement = tryCast(ArrayUtil.getLastElement(statements), PsiExpressionStatement.class);
    if (expressionStatement == null) return null;
    return tryCast(expressionStatement.getExpression(), PsiMethodCallExpression.class);
  }
@Nullable
  private static PsiMethodCallExpression getLastMethodCall(PsiStatement[] statements)