Rewriting unit tests properly