Porting unit tests