Refactor tests.

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>
Fix #1

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>