Added tests and mockery