Introduce macro for checking relation between all pairs of nodes in unit test