Refactored test to repository helper

Signed-off By: Rafael Manzo <rr.manzo@gmail.com>
Signed-off By: Renan Fichberg <rfichberg@gmail.com>