Add some tests and move mockery helpers