compatible with withmock