Refactor and expand unit tests #2626

We test more common REST operation automatically, avoiding
duplicated code while covering more code and reducing time needed
per tests (by using sub-tests techniques)