The doctrine of equitable subrogation provides that a mortgagee who pays off a prior mortgage without knowledge of the existence of an intervening lien may have its rights subrogated to the rights of the senior mortgage and thus gain priority over the intervening lien holder. See Roth v. Porush, 722 N.Y.S.2d 566, 568 (App.Div. 2001). The doctrine does not apply, where the party seeking subrogation has notice of the intervening lien. R.C.P.S. Assoc. v. Karam Developers, 656 N.Y.S.2d 666, 667 (App.Div. 1997).