But contexts are different.. Those countries don't have territorial problems with their neighbours thus their focus is not territorial integrity but civic matters. If such an agreement occurs between Greece and Turkey, there would be no such a case to be seen in the court.
btw Kosovo ruling of ICJ is not related to what I just wrote. Just wanted to point it out in case you wanted to bring it up
A courts' juristictional power is what it is, one cannot recognise power of one type of subject and not another. This nulifies the foundation of the concept.