Adjust expected warning -> exception