Update test to TestNG
Test for sanity checking relations before adding or removing
Cleanup of test with code reuse of setup and checking
Check of calls of index