copying over some unit tests