Helpers for unittests