Hogwarts gives a matchmaking / compatibility test to every of age student. When Hermione turns seventeen she is made to take the test and ends up pairing with a student who took the test twenty years ago. Refusing to accept the results she demands a more in depth retake. The results: Not only are they matched, but they have one of the highest matches in history.