unit tests improvements