unit tests adapted to ctx behavior