Test refactoring

Signed-off-by: Tommaso Visconti <tommaso.visconti@gmail.com>