Improvement to test to avoid warning