Fix warnings in unit tests