Unit test improvment 2

Make sure the tests do not throw unwanted warnings.