Improves assert usage in tests