Replaced assertTrue in tests with more suitable assertion