Initial java relatedtest working implementation