From bc25293a8aa77c93a20deb9d5ae754dd1ecd48e4 Mon Sep 17 00:00:00 2001
From: Annie Mao <anniem4@cs.washington.edu>
Date: Fri, 6 Sep 2019 15:55:59 -0700
Subject: [PATCH] Added null check to find() call to prevent
 NullPointerException when running tests.

---
 src/tests/gitlab/ckpt2/AVLTreeTests.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/tests/gitlab/ckpt2/AVLTreeTests.java b/src/tests/gitlab/ckpt2/AVLTreeTests.java
index d649f4f..c12088c 100644
--- a/src/tests/gitlab/ckpt2/AVLTreeTests.java
+++ b/src/tests/gitlab/ckpt2/AVLTreeTests.java
@@ -139,6 +139,7 @@ public class AVLTreeTests extends TestsUtility {
 		// Check for accuracy
 		passed &= totalCount == (n * (n + 1)) / 2 * 5;
 		passed &= tree.size() == n;
+		passed &= tree.find("00851") != null;
 		passed &= tree.find("00851") == 4260;
 		
 		return passed ? 1 : 0;
-- 
GitLab