[tests] Make tests less verbose and more readable

This change adds a small helper method, allowing to remove a lot of redundancy.
[tests] Remove useless namespace

This is already aliased at the top of the file.