Fix assertion in tests