Always restore mocked instance after test

Signed-off-by: Michal Čihař <michal@cihar.com>