Implemented relationships analysis; added unit test for the relationship lookup