Refactoring tests to be able to run test in 2 flavours default async and sync, adding api to check indexing activities, cleaning test a bit