further improve unit tests