ApiRelationProvider improvement and tests files