Created adjacency test for nodes with adjacency requirements.