commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pascalschumac...@apache.org
Subject [lang] use assertNull where possible
Date Sun, 15 Oct 2017 08:40:18 GMT
Repository: commons-lang
Updated Branches:
  refs/heads/master 66226ec1c -> ae924788d


use assertNull where possible


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/ae924788
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/ae924788
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/ae924788

Branch: refs/heads/master
Commit: ae924788d9b222beefa1723b3d704975fc4e877a
Parents: 66226ec
Author: pascalschumacher <pascalschumacher@gmx.net>
Authored: Sun Oct 15 10:40:07 2017 +0200
Committer: pascalschumacher <pascalschumacher@gmx.net>
Committed: Sun Oct 15 10:40:07 2017 +0200

----------------------------------------------------------------------
 .../apache/commons/lang3/ArrayUtilsTest.java    | 86 ++++++++++----------
 .../apache/commons/lang3/BooleanUtilsTest.java  | 35 ++++----
 .../commons/lang3/CharSequenceUtilsTest.java    | 11 +--
 .../org/apache/commons/lang3/CharSetTest.java   |  3 +-
 .../apache/commons/lang3/CharSetUtilsTest.java  | 37 +++++----
 .../org/apache/commons/lang3/CharUtilsTest.java |  9 +-
 .../apache/commons/lang3/ClassUtilsTest.java    | 12 +--
 .../org/apache/commons/lang3/EnumUtilsTest.java |  5 +-
 .../apache/commons/lang3/ObjectUtilsTest.java   |  2 +-
 .../commons/lang3/StringEscapeUtilsTest.java    | 21 ++---
 .../commons/lang3/StringUtilsSubstringTest.java | 48 +++++------
 .../apache/commons/lang3/StringUtilsTest.java   | 40 ++++-----
 .../commons/lang3/StringUtilsTrimStripTest.java | 44 +++++-----
 .../lang3/mutable/MutableObjectTest.java        |  5 +-
 .../commons/lang3/text/StrBuilderTest.java      | 11 +--
 .../commons/lang3/text/StrLookupTest.java       | 23 +++---
 .../commons/lang3/text/StrSubstitutorTest.java  | 18 ++--
 .../commons/lang3/text/StrTokenizerTest.java    | 34 ++++----
 .../commons/lang3/text/WordUtilsTest.java       | 45 +++++-----
 19 files changed, 250 insertions(+), 239 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/ae924788/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java b/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java
index cccccd7..e6f94fc 100644
--- a/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java
@@ -225,7 +225,7 @@ public class ArrayUtilsTest {
         assertEquals("bar", map.get("foo"));
         assertEquals("world", map.get("hello"));
 
-        assertEquals(null, ArrayUtils.toMap(null));
+        assertNull(ArrayUtils.toMap(null));
         try {
             ArrayUtils.toMap(new String[][]{{"foo", "bar"}, {"short"}});
             fail("exception expected");
@@ -292,7 +292,7 @@ public class ArrayUtilsTest {
 
     @Test
     public void testCloneBoolean() {
-        assertEquals(null, ArrayUtils.clone((boolean[]) null));
+        assertNull(ArrayUtils.clone((boolean[]) null));
         final boolean[] original = new boolean[]{true, false};
         final boolean[] cloned = ArrayUtils.clone(original);
         assertTrue(Arrays.equals(original, cloned));
@@ -301,7 +301,7 @@ public class ArrayUtilsTest {
 
     @Test
     public void testCloneLong() {
-        assertEquals(null, ArrayUtils.clone((long[]) null));
+        assertNull(ArrayUtils.clone((long[]) null));
         final long[] original = new long[]{0L, 1L};
         final long[] cloned = ArrayUtils.clone(original);
         assertTrue(Arrays.equals(original, cloned));
@@ -310,7 +310,7 @@ public class ArrayUtilsTest {
 
     @Test
     public void testCloneInt() {
-        assertEquals(null, ArrayUtils.clone((int[]) null));
+        assertNull(ArrayUtils.clone((int[]) null));
         final int[] original = new int[]{5, 8};
         final int[] cloned = ArrayUtils.clone(original);
         assertTrue(Arrays.equals(original, cloned));
@@ -319,7 +319,7 @@ public class ArrayUtilsTest {
 
     @Test
     public void testCloneShort() {
-        assertEquals(null, ArrayUtils.clone((short[]) null));
+        assertNull(ArrayUtils.clone((short[]) null));
         final short[] original = new short[]{1, 4};
         final short[] cloned = ArrayUtils.clone(original);
         assertTrue(Arrays.equals(original, cloned));
@@ -328,7 +328,7 @@ public class ArrayUtilsTest {
 
     @Test
     public void testCloneChar() {
-        assertEquals(null, ArrayUtils.clone((char[]) null));
+        assertNull(ArrayUtils.clone((char[]) null));
         final char[] original = new char[]{'a', '4'};
         final char[] cloned = ArrayUtils.clone(original);
         assertTrue(Arrays.equals(original, cloned));
@@ -337,7 +337,7 @@ public class ArrayUtilsTest {
 
     @Test
     public void testCloneByte() {
-        assertEquals(null, ArrayUtils.clone((byte[]) null));
+        assertNull(ArrayUtils.clone((byte[]) null));
         final byte[] original = new byte[]{1, 6};
         final byte[] cloned = ArrayUtils.clone(original);
         assertTrue(Arrays.equals(original, cloned));
@@ -346,7 +346,7 @@ public class ArrayUtilsTest {
 
     @Test
     public void testCloneDouble() {
-        assertEquals(null, ArrayUtils.clone((double[]) null));
+        assertNull(ArrayUtils.clone((double[]) null));
         final double[] original = new double[]{2.4d, 5.7d};
         final double[] cloned = ArrayUtils.clone(original);
         assertTrue(Arrays.equals(original, cloned));
@@ -355,7 +355,7 @@ public class ArrayUtilsTest {
 
     @Test
     public void testCloneFloat() {
-        assertEquals(null, ArrayUtils.clone((float[]) null));
+        assertNull(ArrayUtils.clone((float[]) null));
         final float[] original = new float[]{2.6f, 6.4f};
         final float[] cloned = ArrayUtils.clone(original);
         assertTrue(Arrays.equals(original, cloned));
@@ -1745,7 +1745,7 @@ public class ArrayUtilsTest {
 
         array = null;
         ArrayUtils.reverse(array);
-        assertEquals(null, array);
+        assertNull(array);
     }
 
     @Test
@@ -1758,7 +1758,7 @@ public class ArrayUtilsTest {
 
         array = null;
         ArrayUtils.reverse(array);
-        assertEquals(null, array);
+        assertNull(array);
     }
 
     @Test
@@ -1771,7 +1771,7 @@ public class ArrayUtilsTest {
 
         array = null;
         ArrayUtils.reverse(array);
-        assertEquals(null, array);
+        assertNull(array);
     }
 
     @Test
@@ -1784,7 +1784,7 @@ public class ArrayUtilsTest {
 
         array = null;
         ArrayUtils.reverse(array);
-        assertEquals(null, array);
+        assertNull(array);
     }
 
     @Test
@@ -1797,7 +1797,7 @@ public class ArrayUtilsTest {
 
         array = null;
         ArrayUtils.reverse(array);
-        assertEquals(null, array);
+        assertNull(array);
     }
 
     @Test
@@ -1810,7 +1810,7 @@ public class ArrayUtilsTest {
 
         array = null;
         ArrayUtils.reverse(array);
-        assertEquals(null, array);
+        assertNull(array);
     }
 
     @Test
@@ -1823,7 +1823,7 @@ public class ArrayUtilsTest {
 
         array = null;
         ArrayUtils.reverse(array);
-        assertEquals(null, array);
+        assertNull(array);
     }
 
     @Test
@@ -1836,7 +1836,7 @@ public class ArrayUtilsTest {
 
         array = null;
         ArrayUtils.reverse(array);
-        assertEquals(null, array);
+        assertNull(array);
     }
 
     @Test
@@ -1868,7 +1868,7 @@ public class ArrayUtilsTest {
         // null
         array = null;
         ArrayUtils.reverse(array, 0, 3);
-        assertEquals(null, array);
+        assertNull(array);
     }
 
     @Test
@@ -1900,7 +1900,7 @@ public class ArrayUtilsTest {
         // null
         array = null;
         ArrayUtils.reverse(array, 0, 3);
-        assertEquals(null, array);
+        assertNull(array);
     }
 
     @Test
@@ -1932,7 +1932,7 @@ public class ArrayUtilsTest {
         // null
         array = null;
         ArrayUtils.reverse(array, 0, 3);
-        assertEquals(null, array);
+        assertNull(array);
     }
 
     @Test
@@ -1964,7 +1964,7 @@ public class ArrayUtilsTest {
         // null
         array = null;
         ArrayUtils.reverse(array, 0, 3);
-        assertEquals(null, array);
+        assertNull(array);
     }
 
     @Test
@@ -1996,7 +1996,7 @@ public class ArrayUtilsTest {
         // null
         array = null;
         ArrayUtils.reverse(array, 0, 3);
-        assertEquals(null, array);
+        assertNull(array);
     }
 
     @Test
@@ -2028,7 +2028,7 @@ public class ArrayUtilsTest {
         // null
         array = null;
         ArrayUtils.reverse(array, 0, 3);
-        assertEquals(null, array);
+        assertNull(array);
     }
 
     @Test
@@ -2060,7 +2060,7 @@ public class ArrayUtilsTest {
         // null
         array = null;
         ArrayUtils.reverse(array, 0, 3);
-        assertEquals(null, array);
+        assertNull(array);
     }
 
     @Test
@@ -2092,7 +2092,7 @@ public class ArrayUtilsTest {
         // null
         array = null;
         ArrayUtils.reverse(array, 0, 3);
-        assertEquals(null, array);
+        assertNull(array);
     }
 
     @Test
@@ -2124,7 +2124,7 @@ public class ArrayUtilsTest {
         // null
         array = null;
         ArrayUtils.reverse(array, 0, 3);
-        assertEquals(null, array);
+        assertNull(array);
     }
 
     //-----------------------------------------------------------------------
@@ -4126,7 +4126,7 @@ public class ArrayUtilsTest {
     @Test
     public void testToPrimitive_boolean() {
         final Boolean[] b = null;
-        assertEquals(null, ArrayUtils.toPrimitive(b));
+        assertNull(ArrayUtils.toPrimitive(b));
         assertSame(ArrayUtils.EMPTY_BOOLEAN_ARRAY, ArrayUtils.toPrimitive(new Boolean[0]));
         assertTrue(Arrays.equals(
                 new boolean[]{true, false, true},
@@ -4142,7 +4142,7 @@ public class ArrayUtilsTest {
 
     @Test
     public void testToPrimitive_boolean_boolean() {
-        assertEquals(null, ArrayUtils.toPrimitive(null, false));
+        assertNull(ArrayUtils.toPrimitive(null, false));
         assertSame(ArrayUtils.EMPTY_BOOLEAN_ARRAY, ArrayUtils.toPrimitive(new Boolean[0], false));
         assertTrue(Arrays.equals(
                 new boolean[]{true, false, true},
@@ -4174,7 +4174,7 @@ public class ArrayUtilsTest {
     @Test
     public void testToPrimitive_char() {
         final Character[] b = null;
-        assertEquals(null, ArrayUtils.toPrimitive(b));
+        assertNull(ArrayUtils.toPrimitive(b));
 
         assertSame(ArrayUtils.EMPTY_CHAR_ARRAY, ArrayUtils.toPrimitive(new Character[0]));
 
@@ -4194,7 +4194,7 @@ public class ArrayUtilsTest {
     @Test
     public void testToPrimitive_char_char() {
         final Character[] b = null;
-        assertEquals(null, ArrayUtils.toPrimitive(b, Character.MIN_VALUE));
+        assertNull(ArrayUtils.toPrimitive(b, Character.MIN_VALUE));
 
         assertSame(ArrayUtils.EMPTY_CHAR_ARRAY,
                 ArrayUtils.toPrimitive(new Character[0], (char) 0));
@@ -4234,7 +4234,7 @@ public class ArrayUtilsTest {
     @Test
     public void testToPrimitive_byte() {
         final Byte[] b = null;
-        assertEquals(null, ArrayUtils.toPrimitive(b));
+        assertNull(ArrayUtils.toPrimitive(b));
 
         assertSame(ArrayUtils.EMPTY_BYTE_ARRAY, ArrayUtils.toPrimitive(new Byte[0]));
 
@@ -4254,7 +4254,7 @@ public class ArrayUtilsTest {
     @Test
     public void testToPrimitive_byte_byte() {
         final Byte[] b = null;
-        assertEquals(null, ArrayUtils.toPrimitive(b, Byte.MIN_VALUE));
+        assertNull(ArrayUtils.toPrimitive(b, Byte.MIN_VALUE));
 
         assertSame(ArrayUtils.EMPTY_BYTE_ARRAY,
                 ArrayUtils.toPrimitive(new Byte[0], (byte) 1));
@@ -4294,7 +4294,7 @@ public class ArrayUtilsTest {
     @Test
     public void testToPrimitive_short() {
         final Short[] b = null;
-        assertEquals(null, ArrayUtils.toPrimitive(b));
+        assertNull(ArrayUtils.toPrimitive(b));
 
         assertSame(ArrayUtils.EMPTY_SHORT_ARRAY, ArrayUtils.toPrimitive(new Short[0]));
 
@@ -4314,7 +4314,7 @@ public class ArrayUtilsTest {
     @Test
     public void testToPrimitive_short_short() {
         final Short[] s = null;
-        assertEquals(null, ArrayUtils.toPrimitive(s, Short.MIN_VALUE));
+        assertNull(ArrayUtils.toPrimitive(s, Short.MIN_VALUE));
 
         assertSame(ArrayUtils.EMPTY_SHORT_ARRAY, ArrayUtils.toPrimitive(new Short[0],
                 Short.MIN_VALUE));
@@ -4353,7 +4353,7 @@ public class ArrayUtilsTest {
     @Test
     public void testToPrimitive_int() {
         final Integer[] b = null;
-        assertEquals(null, ArrayUtils.toPrimitive(b));
+        assertNull(ArrayUtils.toPrimitive(b));
         assertSame(ArrayUtils.EMPTY_INT_ARRAY, ArrayUtils.toPrimitive(new Integer[0]));
         assertTrue(Arrays.equals(
                 new int[]{Integer.MIN_VALUE, Integer.MAX_VALUE, 9999999},
@@ -4371,7 +4371,7 @@ public class ArrayUtilsTest {
     @Test
     public void testToPrimitive_int_int() {
         final Long[] l = null;
-        assertEquals(null, ArrayUtils.toPrimitive(l, Integer.MIN_VALUE));
+        assertNull(ArrayUtils.toPrimitive(l, Integer.MIN_VALUE));
         assertSame(ArrayUtils.EMPTY_INT_ARRAY,
                 ArrayUtils.toPrimitive(new Integer[0], 1));
         assertTrue(Arrays.equals(
@@ -4388,7 +4388,7 @@ public class ArrayUtilsTest {
     @Test
     public void testToPrimitive_intNull() {
         final Integer[] iArray = null;
-        assertEquals(null, ArrayUtils.toPrimitive(iArray, Integer.MIN_VALUE));
+        assertNull(ArrayUtils.toPrimitive(iArray, Integer.MIN_VALUE));
     }
 
     @Test
@@ -4415,7 +4415,7 @@ public class ArrayUtilsTest {
     @Test
     public void testToPrimitive_long() {
         final Long[] b = null;
-        assertEquals(null, ArrayUtils.toPrimitive(b));
+        assertNull(ArrayUtils.toPrimitive(b));
 
         assertSame(ArrayUtils.EMPTY_LONG_ARRAY,
                 ArrayUtils.toPrimitive(new Long[0]));
@@ -4436,7 +4436,7 @@ public class ArrayUtilsTest {
     @Test
     public void testToPrimitive_long_long() {
         final Long[] l = null;
-        assertEquals(null, ArrayUtils.toPrimitive(l, Long.MIN_VALUE));
+        assertNull(ArrayUtils.toPrimitive(l, Long.MIN_VALUE));
 
         assertSame(ArrayUtils.EMPTY_LONG_ARRAY,
                 ArrayUtils.toPrimitive(new Long[0], 1));
@@ -4477,7 +4477,7 @@ public class ArrayUtilsTest {
     @Test
     public void testToPrimitive_float() {
         final Float[] b = null;
-        assertEquals(null, ArrayUtils.toPrimitive(b));
+        assertNull(ArrayUtils.toPrimitive(b));
 
         assertSame(ArrayUtils.EMPTY_FLOAT_ARRAY,
                 ArrayUtils.toPrimitive(new Float[0]));
@@ -4498,7 +4498,7 @@ public class ArrayUtilsTest {
     @Test
     public void testToPrimitive_float_float() {
         final Float[] l = null;
-        assertEquals(null, ArrayUtils.toPrimitive(l, Float.MIN_VALUE));
+        assertNull(ArrayUtils.toPrimitive(l, Float.MIN_VALUE));
 
         assertSame(ArrayUtils.EMPTY_FLOAT_ARRAY,
                 ArrayUtils.toPrimitive(new Float[0], 1));
@@ -4539,7 +4539,7 @@ public class ArrayUtilsTest {
     @Test
     public void testToPrimitive_double() {
         final Double[] b = null;
-        assertEquals(null, ArrayUtils.toPrimitive(b));
+        assertNull(ArrayUtils.toPrimitive(b));
 
         assertSame(ArrayUtils.EMPTY_DOUBLE_ARRAY,
                 ArrayUtils.toPrimitive(new Double[0]));
@@ -4560,7 +4560,7 @@ public class ArrayUtilsTest {
     @Test
     public void testToPrimitive_double_double() {
         final Double[] l = null;
-        assertEquals(null, ArrayUtils.toPrimitive(l, Double.MIN_VALUE));
+        assertNull(ArrayUtils.toPrimitive(l, Double.MIN_VALUE));
 
         assertSame(ArrayUtils.EMPTY_DOUBLE_ARRAY,
                 ArrayUtils.toPrimitive(new Double[0], 1));

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/ae924788/src/test/java/org/apache/commons/lang3/BooleanUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/BooleanUtilsTest.java b/src/test/java/org/apache/commons/lang3/BooleanUtilsTest.java
index 5d22dad..4fd3ad8 100644
--- a/src/test/java/org/apache/commons/lang3/BooleanUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/BooleanUtilsTest.java
@@ -19,6 +19,7 @@ package org.apache.commons.lang3;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 
@@ -120,7 +121,7 @@ public class BooleanUtilsTest {
         assertEquals(Boolean.TRUE, BooleanUtils.toBooleanObject(Integer.valueOf(1)));
         assertEquals(Boolean.TRUE, BooleanUtils.toBooleanObject(Integer.valueOf(-1)));
         assertEquals(Boolean.FALSE, BooleanUtils.toBooleanObject(Integer.valueOf(0)));
-        assertEquals(null, BooleanUtils.toBooleanObject((Integer) null));
+        assertNull(BooleanUtils.toBooleanObject((Integer) null));
     }
 
     //-----------------------------------------------------------------------
@@ -162,7 +163,7 @@ public class BooleanUtilsTest {
     public void test_toBooleanObject_int_int_int() {
         assertEquals(Boolean.TRUE, BooleanUtils.toBooleanObject(6, 6, 7, 8));
         assertEquals(Boolean.FALSE, BooleanUtils.toBooleanObject(7, 6, 7, 8));
-        assertEquals(null, BooleanUtils.toBooleanObject(8, 6, 7, 8));
+        assertNull(BooleanUtils.toBooleanObject(8, 6, 7, 8));
     }
 
     @Test(expected = IllegalArgumentException.class)
@@ -182,7 +183,7 @@ public class BooleanUtilsTest {
 
         assertEquals(Boolean.TRUE, BooleanUtils.toBooleanObject(Integer.valueOf(6), six, seven, eight));
         assertEquals(Boolean.FALSE, BooleanUtils.toBooleanObject(Integer.valueOf(7), six, seven, eight));
-        assertEquals(null, BooleanUtils.toBooleanObject(Integer.valueOf(8), six, seven, eight));
+        assertNull(BooleanUtils.toBooleanObject(Integer.valueOf(8), six, seven, eight));
     }
 
     @Test(expected = IllegalArgumentException.class)
@@ -212,7 +213,7 @@ public class BooleanUtilsTest {
     public void test_toIntegerObject_Boolean() {
         assertEquals(Integer.valueOf(1), BooleanUtils.toIntegerObject(Boolean.TRUE));
         assertEquals(Integer.valueOf(0), BooleanUtils.toIntegerObject(Boolean.FALSE));
-        assertEquals(null, BooleanUtils.toIntegerObject(null));
+        assertNull(BooleanUtils.toIntegerObject(null));
     }
 
     //-----------------------------------------------------------------------
@@ -245,22 +246,22 @@ public class BooleanUtilsTest {
         assertEquals(six, BooleanUtils.toIntegerObject(Boolean.TRUE, six, seven, eight));
         assertEquals(seven, BooleanUtils.toIntegerObject(Boolean.FALSE, six, seven, eight));
         assertEquals(eight, BooleanUtils.toIntegerObject(null, six, seven, eight));
-        assertEquals(null, BooleanUtils.toIntegerObject(null, six, seven, null));
+        assertNull(BooleanUtils.toIntegerObject(null, six, seven, null));
     }
 
     //-----------------------------------------------------------------------
     //-----------------------------------------------------------------------
     @Test
     public void test_toBooleanObject_String() {
-        assertEquals(null, BooleanUtils.toBooleanObject((String) null));
-        assertEquals(null, BooleanUtils.toBooleanObject(""));
+        assertNull(BooleanUtils.toBooleanObject((String) null));
+        assertNull(BooleanUtils.toBooleanObject(""));
         assertEquals(Boolean.FALSE, BooleanUtils.toBooleanObject("false"));
         assertEquals(Boolean.FALSE, BooleanUtils.toBooleanObject("no"));
         assertEquals(Boolean.FALSE, BooleanUtils.toBooleanObject("off"));
         assertEquals(Boolean.FALSE, BooleanUtils.toBooleanObject("FALSE"));
         assertEquals(Boolean.FALSE, BooleanUtils.toBooleanObject("NO"));
         assertEquals(Boolean.FALSE, BooleanUtils.toBooleanObject("OFF"));
-        assertEquals(null, BooleanUtils.toBooleanObject("oof"));
+        assertNull(BooleanUtils.toBooleanObject("oof"));
         assertEquals(Boolean.TRUE, BooleanUtils.toBooleanObject("true"));
         assertEquals(Boolean.TRUE, BooleanUtils.toBooleanObject("yes"));
         assertEquals(Boolean.TRUE, BooleanUtils.toBooleanObject("on"));
@@ -278,12 +279,12 @@ public class BooleanUtilsTest {
         assertEquals(Boolean.FALSE, BooleanUtils.toBooleanObject("F"));
         assertEquals(Boolean.FALSE, BooleanUtils.toBooleanObject("n")); // No
         assertEquals(Boolean.FALSE, BooleanUtils.toBooleanObject("N"));
-        assertEquals(null, BooleanUtils.toBooleanObject("z"));
+        assertNull(BooleanUtils.toBooleanObject("z"));
 
-        assertEquals(null, BooleanUtils.toBooleanObject("ab"));
-        assertEquals(null, BooleanUtils.toBooleanObject("yoo"));
-        assertEquals(null, BooleanUtils.toBooleanObject("true "));
-        assertEquals(null, BooleanUtils.toBooleanObject("ono"));
+        assertNull(BooleanUtils.toBooleanObject("ab"));
+        assertNull(BooleanUtils.toBooleanObject("yoo"));
+        assertNull(BooleanUtils.toBooleanObject("true "));
+        assertNull(BooleanUtils.toBooleanObject("ono"));
     }
 
     @Test
@@ -294,7 +295,7 @@ public class BooleanUtilsTest {
 
         assertEquals(Boolean.TRUE, BooleanUtils.toBooleanObject("Y", "Y", "N", "U"));
         assertEquals(Boolean.FALSE, BooleanUtils.toBooleanObject("N", "Y", "N", "U"));
-        assertEquals(null, BooleanUtils.toBooleanObject("U", "Y", "N", "U"));
+        assertNull(BooleanUtils.toBooleanObject("U", "Y", "N", "U"));
     }
 
     @Test(expected = IllegalArgumentException.class)
@@ -381,21 +382,21 @@ public class BooleanUtilsTest {
     //-----------------------------------------------------------------------
     @Test
     public void test_toStringTrueFalse_Boolean() {
-        assertEquals(null, BooleanUtils.toStringTrueFalse(null));
+        assertNull(BooleanUtils.toStringTrueFalse(null));
         assertEquals("true", BooleanUtils.toStringTrueFalse(Boolean.TRUE));
         assertEquals("false", BooleanUtils.toStringTrueFalse(Boolean.FALSE));
     }
 
     @Test
     public void test_toStringOnOff_Boolean() {
-        assertEquals(null, BooleanUtils.toStringOnOff(null));
+        assertNull(BooleanUtils.toStringOnOff(null));
         assertEquals("on", BooleanUtils.toStringOnOff(Boolean.TRUE));
         assertEquals("off", BooleanUtils.toStringOnOff(Boolean.FALSE));
     }
 
     @Test
     public void test_toStringYesNo_Boolean() {
-        assertEquals(null, BooleanUtils.toStringYesNo(null));
+        assertNull(BooleanUtils.toStringYesNo(null));
         assertEquals("yes", BooleanUtils.toStringYesNo(Boolean.TRUE));
         assertEquals("no", BooleanUtils.toStringYesNo(Boolean.FALSE));
     }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/ae924788/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java b/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java
index 891d7dd..4b03087 100644
--- a/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java
@@ -20,6 +20,7 @@ import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
@@ -50,9 +51,9 @@ public class CharSequenceUtilsTest {
         //
         // null input
         //
-        assertEquals(null, CharSequenceUtils.subSequence(null, -1));
-        assertEquals(null, CharSequenceUtils.subSequence(null, 0));
-        assertEquals(null, CharSequenceUtils.subSequence(null, 1));
+        assertNull(CharSequenceUtils.subSequence(null, -1));
+        assertNull(CharSequenceUtils.subSequence(null, 0));
+        assertNull(CharSequenceUtils.subSequence(null, 1));
         //
         // non-null input
         //
@@ -65,12 +66,12 @@ public class CharSequenceUtilsTest {
 
     @Test(expected=IndexOutOfBoundsException.class)
     public void testSubSequenceNegativeStart() {
-        assertEquals(null, CharSequenceUtils.subSequence(StringUtils.EMPTY, -1));
+        assertNull(CharSequenceUtils.subSequence(StringUtils.EMPTY, -1));
     }
 
     @Test(expected=IndexOutOfBoundsException.class)
     public void testSubSequenceTooLong() {
-        assertEquals(null, CharSequenceUtils.subSequence(StringUtils.EMPTY, 1));
+        assertNull(CharSequenceUtils.subSequence(StringUtils.EMPTY, 1));
     }
 
     static class TestData{

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/ae924788/src/test/java/org/apache/commons/lang3/CharSetTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/CharSetTest.java b/src/test/java/org/apache/commons/lang3/CharSetTest.java
index 035dc4b..7c8dff4 100644
--- a/src/test/java/org/apache/commons/lang3/CharSetTest.java
+++ b/src/test/java/org/apache/commons/lang3/CharSetTest.java
@@ -20,6 +20,7 @@ package org.apache.commons.lang3;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 
@@ -54,7 +55,7 @@ public class CharSetTest  {
     //-----------------------------------------------------------------------
     @Test
     public void testGetInstance_Stringarray() {
-        assertEquals(null, CharSet.getInstance((String[]) null));
+        assertNull(CharSet.getInstance((String[]) null));
         assertEquals("[]", CharSet.getInstance(new String[0]).toString());
         assertEquals("[]", CharSet.getInstance(new String[] {null}).toString());
         assertEquals("[a-e]", CharSet.getInstance(new String[] {"a-e"}).toString());

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/ae924788/src/test/java/org/apache/commons/lang3/CharSetUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/CharSetUtilsTest.java b/src/test/java/org/apache/commons/lang3/CharSetUtilsTest.java
index e070816..2f1296a 100644
--- a/src/test/java/org/apache/commons/lang3/CharSetUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/CharSetUtilsTest.java
@@ -19,6 +19,7 @@ package org.apache.commons.lang3;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
 import java.lang.reflect.Constructor;
@@ -45,8 +46,8 @@ public class CharSetUtilsTest  {
     //-----------------------------------------------------------------------
     @Test
     public void testSqueeze_StringString() {
-        assertEquals(null, CharSetUtils.squeeze(null, (String) null));
-        assertEquals(null, CharSetUtils.squeeze(null, ""));
+        assertNull(CharSetUtils.squeeze(null, (String) null));
+        assertNull(CharSetUtils.squeeze(null, ""));
 
         assertEquals("", CharSetUtils.squeeze("", (String) null));
         assertEquals("", CharSetUtils.squeeze("", ""));
@@ -62,10 +63,10 @@ public class CharSetUtilsTest  {
 
     @Test
     public void testSqueeze_StringStringarray() {
-        assertEquals(null, CharSetUtils.squeeze(null, (String[]) null));
-        assertEquals(null, CharSetUtils.squeeze(null, new String[0]));
-        assertEquals(null, CharSetUtils.squeeze(null, new String[] {null}));
-        assertEquals(null, CharSetUtils.squeeze(null, new String[] {"el"}));
+        assertNull(CharSetUtils.squeeze(null, (String[]) null));
+        assertNull(CharSetUtils.squeeze(null, new String[0]));
+        assertNull(CharSetUtils.squeeze(null, new String[] {null}));
+        assertNull(CharSetUtils.squeeze(null, new String[] {"el"}));
 
         assertEquals("", CharSetUtils.squeeze("", (String[]) null));
         assertEquals("", CharSetUtils.squeeze(""));
@@ -166,8 +167,8 @@ public class CharSetUtilsTest  {
     //-----------------------------------------------------------------------
     @Test
     public void testKeep_StringString() {
-        assertEquals(null, CharSetUtils.keep(null, (String) null));
-        assertEquals(null, CharSetUtils.keep(null, ""));
+        assertNull(CharSetUtils.keep(null, (String) null));
+        assertNull(CharSetUtils.keep(null, ""));
 
         assertEquals("", CharSetUtils.keep("", (String) null));
         assertEquals("", CharSetUtils.keep("", ""));
@@ -183,10 +184,10 @@ public class CharSetUtilsTest  {
 
     @Test
     public void testKeep_StringStringarray() {
-        assertEquals(null, CharSetUtils.keep(null, (String[]) null));
-        assertEquals(null, CharSetUtils.keep(null, new String[0]));
-        assertEquals(null, CharSetUtils.keep(null, new String[] {null}));
-        assertEquals(null, CharSetUtils.keep(null, new String[] {"a-e"}));
+        assertNull(CharSetUtils.keep(null, (String[]) null));
+        assertNull(CharSetUtils.keep(null, new String[0]));
+        assertNull(CharSetUtils.keep(null, new String[] {null}));
+        assertNull(CharSetUtils.keep(null, new String[] {"a-e"}));
 
         assertEquals("", CharSetUtils.keep("", (String[]) null));
         assertEquals("", CharSetUtils.keep(""));
@@ -209,8 +210,8 @@ public class CharSetUtilsTest  {
     //-----------------------------------------------------------------------
     @Test
     public void testDelete_StringString() {
-        assertEquals(null, CharSetUtils.delete(null, (String) null));
-        assertEquals(null, CharSetUtils.delete(null, ""));
+        assertNull(CharSetUtils.delete(null, (String) null));
+        assertNull(CharSetUtils.delete(null, ""));
 
         assertEquals("", CharSetUtils.delete("", (String) null));
         assertEquals("", CharSetUtils.delete("", ""));
@@ -225,10 +226,10 @@ public class CharSetUtilsTest  {
 
     @Test
     public void testDelete_StringStringarray() {
-        assertEquals(null, CharSetUtils.delete(null, (String[]) null));
-        assertEquals(null, CharSetUtils.delete(null, new String[0]));
-        assertEquals(null, CharSetUtils.delete(null, new String[] {null}));
-        assertEquals(null, CharSetUtils.delete(null, new String[] {"el"}));
+        assertNull(CharSetUtils.delete(null, (String[]) null));
+        assertNull(CharSetUtils.delete(null, new String[0]));
+        assertNull(CharSetUtils.delete(null, new String[] {null}));
+        assertNull(CharSetUtils.delete(null, new String[] {"el"}));
 
         assertEquals("", CharSetUtils.delete("", (String[]) null));
         assertEquals("", CharSetUtils.delete(""));

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/ae924788/src/test/java/org/apache/commons/lang3/CharUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/CharUtilsTest.java b/src/test/java/org/apache/commons/lang3/CharUtilsTest.java
index 50f2634..2d10ade 100644
--- a/src/test/java/org/apache/commons/lang3/CharUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/CharUtilsTest.java
@@ -19,6 +19,7 @@ package org.apache.commons.lang3;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
@@ -72,8 +73,8 @@ public class CharUtilsTest {
 
     @Test
     public void testToCharacterObject_String() {
-        assertEquals(null, CharUtils.toCharacterObject(null));
-        assertEquals(null, CharUtils.toCharacterObject(""));
+        assertNull(CharUtils.toCharacterObject(null));
+        assertNull(CharUtils.toCharacterObject(""));
         assertEquals(new Character('a'), CharUtils.toCharacterObject("a"));
         assertEquals(new Character('a'), CharUtils.toCharacterObject("abc"));
         assertSame(CharUtils.toCharacterObject("a"), CharUtils.toCharacterObject("a"));
@@ -191,7 +192,7 @@ public class CharUtilsTest {
 
     @Test
     public void testToString_Character() {
-        assertEquals(null, CharUtils.toString(null));
+        assertNull(CharUtils.toString(null));
         assertEquals("A", CharUtils.toString(CHARACTER_A));
         assertSame(CharUtils.toString(CHARACTER_A), CharUtils.toString(CHARACTER_A));
     }
@@ -213,7 +214,7 @@ public class CharUtilsTest {
 
     @Test
     public void testToUnicodeEscaped_Character() {
-        assertEquals(null, CharUtils.unicodeEscaped(null));
+        assertNull(CharUtils.unicodeEscaped(null));
         assertEquals("\\u0041", CharUtils.unicodeEscaped(CHARACTER_A));
     }
 

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/ae924788/src/test/java/org/apache/commons/lang3/ClassUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/ClassUtilsTest.java b/src/test/java/org/apache/commons/lang3/ClassUtilsTest.java
index ab98319..6b97fb5 100644
--- a/src/test/java/org/apache/commons/lang3/ClassUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/ClassUtilsTest.java
@@ -264,7 +264,7 @@ public class ClassUtilsTest  {
         assertEquals(CX.class, list.get(0));
         assertEquals(Object.class, list.get(1));
 
-        assertEquals(null, ClassUtils.getAllSuperclasses(null));
+        assertNull(ClassUtils.getAllSuperclasses(null));
     }
 
     @Test
@@ -278,7 +278,7 @@ public class ClassUtilsTest  {
         assertEquals(IF.class, list.get(4));
         assertEquals(IA.class, list.get(5));
 
-        assertEquals(null, ClassUtils.getAllInterfaces(null));
+        assertNull(ClassUtils.getAllInterfaces(null));
     }
 
     private interface IA {
@@ -311,7 +311,7 @@ public class ClassUtilsTest  {
         result = ClassUtils.convertClassNamesToClasses(list);
         assertEquals(3, result.size());
         assertEquals(String.class, result.get(0));
-        assertEquals(null, result.get(1));
+        assertNull(result.get(1));
         assertEquals(Object.class, result.get(2));
 
         @SuppressWarnings("unchecked") // test what happens when non-generic code adds wrong type of element
@@ -322,7 +322,7 @@ public class ClassUtilsTest  {
             ClassUtils.convertClassNamesToClasses(list);
             fail("Should not have been able to convert list");
         } catch (final ClassCastException expected) {}
-        assertEquals(null, ClassUtils.convertClassNamesToClasses(null));
+        assertNull(ClassUtils.convertClassNamesToClasses(null));
     }
 
     @Test
@@ -337,7 +337,7 @@ public class ClassUtilsTest  {
         result = ClassUtils.convertClassesToClassNames(list);
         assertEquals(3, result.size());
         assertEquals("java.lang.String", result.get(0));
-        assertEquals(null, result.get(1));
+        assertNull(result.get(1));
         assertEquals("java.lang.Object", result.get(2));
 
         @SuppressWarnings("unchecked") // test what happens when non-generic code adds wrong type of element
@@ -348,7 +348,7 @@ public class ClassUtilsTest  {
             ClassUtils.convertClassesToClassNames(list);
             fail("Should not have been able to convert list");
         } catch (final ClassCastException expected) {}
-        assertEquals(null, ClassUtils.convertClassesToClassNames(null));
+        assertNull(ClassUtils.convertClassesToClassNames(null));
     }
 
     // -------------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/ae924788/src/test/java/org/apache/commons/lang3/EnumUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/EnumUtilsTest.java b/src/test/java/org/apache/commons/lang3/EnumUtilsTest.java
index bb425d4..f17ddda 100644
--- a/src/test/java/org/apache/commons/lang3/EnumUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/EnumUtilsTest.java
@@ -20,6 +20,7 @@ package org.apache.commons.lang3;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
 import java.util.ArrayList;
@@ -84,8 +85,8 @@ public class EnumUtilsTest {
         assertEquals(Traffic.RED, EnumUtils.getEnum(Traffic.class, "RED"));
         assertEquals(Traffic.AMBER, EnumUtils.getEnum(Traffic.class, "AMBER"));
         assertEquals(Traffic.GREEN, EnumUtils.getEnum(Traffic.class, "GREEN"));
-        assertEquals(null, EnumUtils.getEnum(Traffic.class, "PURPLE"));
-        assertEquals(null, EnumUtils.getEnum(Traffic.class, null));
+        assertNull(EnumUtils.getEnum(Traffic.class, "PURPLE"));
+        assertNull(EnumUtils.getEnum(Traffic.class, null));
     }
 
     @Test(expected=NullPointerException.class)

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/ae924788/src/test/java/org/apache/commons/lang3/ObjectUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/ObjectUtilsTest.java b/src/test/java/org/apache/commons/lang3/ObjectUtilsTest.java
index d6547f6..3da8443 100644
--- a/src/test/java/org/apache/commons/lang3/ObjectUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/ObjectUtilsTest.java
@@ -193,7 +193,7 @@ public class ObjectUtilsTest {
 
     @Test
     public void testIdentityToStringStringBuilder() {
-        assertEquals(null, ObjectUtils.identityToString(null));
+        assertNull(ObjectUtils.identityToString(null));
         assertEquals(
             "java.lang.String@" + Integer.toHexString(System.identityHashCode(FOO)),
             ObjectUtils.identityToString(FOO));

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/ae924788/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java b/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java
index 3bfeaca..178e11d 100644
--- a/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java
@@ -19,6 +19,7 @@ package org.apache.commons.lang3;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
@@ -54,7 +55,7 @@ public class StringEscapeUtilsTest {
 
     @Test
     public void testEscapeJava() throws IOException {
-        assertEquals(null, StringEscapeUtils.escapeJava(null));
+        assertNull(StringEscapeUtils.escapeJava(null));
         try {
             StringEscapeUtils.ESCAPE_JAVA.translate(null, null);
             fail();
@@ -123,7 +124,7 @@ public class StringEscapeUtilsTest {
 
     @Test
     public void testUnescapeJava() throws IOException {
-        assertEquals(null, StringEscapeUtils.unescapeJava(null));
+        assertNull(StringEscapeUtils.unescapeJava(null));
         try {
             StringEscapeUtils.UNESCAPE_JAVA.translate(null, null);
             fail();
@@ -179,7 +180,7 @@ public class StringEscapeUtilsTest {
 
     @Test
     public void testEscapeEcmaScript() {
-        assertEquals(null, StringEscapeUtils.escapeEcmaScript(null));
+        assertNull(StringEscapeUtils.escapeEcmaScript(null));
         try {
             StringEscapeUtils.ESCAPE_ECMASCRIPT.translate(null, null);
             fail();
@@ -202,7 +203,7 @@ public class StringEscapeUtilsTest {
 
     @Test
     public void testUnescapeEcmaScript() {
-        assertEquals(null, StringEscapeUtils.escapeEcmaScript(null));
+        assertNull(StringEscapeUtils.escapeEcmaScript(null));
         try {
             StringEscapeUtils.UNESCAPE_ECMASCRIPT.translate(null, null);
             fail();
@@ -333,8 +334,8 @@ public class StringEscapeUtilsTest {
         assertEquals("ain't", StringEscapeUtils.unescapeXml("ain&apos;t"));
         assertEquals("ain&apos;t", StringEscapeUtils.escapeXml("ain't"));
         assertEquals("", StringEscapeUtils.escapeXml(""));
-        assertEquals(null, StringEscapeUtils.escapeXml(null));
-        assertEquals(null, StringEscapeUtils.unescapeXml(null));
+        assertNull(StringEscapeUtils.escapeXml(null));
+        assertNull(StringEscapeUtils.unescapeXml(null));
 
         StringWriter sw = new StringWriter();
         try {
@@ -466,7 +467,7 @@ public class StringEscapeUtilsTest {
         assertEquals("\"foo\"\"bar\"",     StringEscapeUtils.escapeCsv("foo\"bar"));
         assertEquals("foo\uD84C\uDFB4bar", StringEscapeUtils.escapeCsv("foo\uD84C\uDFB4bar"));
         assertEquals("",   StringEscapeUtils.escapeCsv(""));
-        assertEquals(null, StringEscapeUtils.escapeCsv(null));
+        assertNull(StringEscapeUtils.escapeCsv(null));
     }
 
     @Test
@@ -506,7 +507,7 @@ public class StringEscapeUtilsTest {
         assertEquals("foo\"bar",             StringEscapeUtils.unescapeCsv("\"foo\"\"bar\""));
         assertEquals("foo\uD84C\uDFB4bar",   StringEscapeUtils.unescapeCsv("foo\uD84C\uDFB4bar"));
         assertEquals("",   StringEscapeUtils.unescapeCsv(""));
-        assertEquals(null, StringEscapeUtils.unescapeCsv(null));
+        assertNull(StringEscapeUtils.unescapeCsv(null));
 
         assertEquals("\"foo.bar\"",          StringEscapeUtils.unescapeCsv("\"foo.bar\""));
     }
@@ -621,7 +622,7 @@ public class StringEscapeUtilsTest {
 
     @Test
     public void testEscapeJson() {
-        assertEquals(null, StringEscapeUtils.escapeJson(null));
+        assertNull(StringEscapeUtils.escapeJson(null));
         try {
             StringEscapeUtils.ESCAPE_JSON.translate(null, null);
             fail();
@@ -647,7 +648,7 @@ public class StringEscapeUtilsTest {
 
     @Test
     public void testUnescapeJson() {
-        assertEquals(null, StringEscapeUtils.unescapeJson(null));
+        assertNull(StringEscapeUtils.unescapeJson(null));
         try {
             StringEscapeUtils.UNESCAPE_JSON.translate(null, null);
             fail();

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/ae924788/src/test/java/org/apache/commons/lang3/StringUtilsSubstringTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/StringUtilsSubstringTest.java b/src/test/java/org/apache/commons/lang3/StringUtilsSubstringTest.java
index 66d03f3..62769f8 100644
--- a/src/test/java/org/apache/commons/lang3/StringUtilsSubstringTest.java
+++ b/src/test/java/org/apache/commons/lang3/StringUtilsSubstringTest.java
@@ -36,7 +36,7 @@ public class StringUtilsSubstringTest  {
 
     @Test
     public void testSubstring_StringInt() {
-        assertEquals(null, StringUtils.substring(null, 0));
+        assertNull(StringUtils.substring(null, 0));
         assertEquals("", StringUtils.substring("", 0));
         assertEquals("", StringUtils.substring("", 2));
 
@@ -57,8 +57,8 @@ public class StringUtilsSubstringTest  {
 
     @Test
     public void testSubstring_StringIntInt() {
-        assertEquals(null, StringUtils.substring(null, 0, 0));
-        assertEquals(null, StringUtils.substring(null, 1, 2));
+        assertNull(StringUtils.substring(null, 0, 0));
+        assertNull(StringUtils.substring(null, 1, 2));
         assertEquals("", StringUtils.substring("", 0, 0));
         assertEquals("", StringUtils.substring("", 1, 2));
         assertEquals("", StringUtils.substring("", -2, -1));
@@ -132,9 +132,9 @@ public class StringUtilsSubstringTest  {
     public void testSubstringBefore_StringString() {
         assertEquals("foo", StringUtils.substringBefore("fooXXbarXXbaz", "XX"));
 
-        assertEquals(null, StringUtils.substringBefore(null, null));
-        assertEquals(null, StringUtils.substringBefore(null, ""));
-        assertEquals(null, StringUtils.substringBefore(null, "XX"));
+        assertNull(StringUtils.substringBefore(null, null));
+        assertNull(StringUtils.substringBefore(null, ""));
+        assertNull(StringUtils.substringBefore(null, "XX"));
         assertEquals("", StringUtils.substringBefore("", null));
         assertEquals("", StringUtils.substringBefore("", ""));
         assertEquals("", StringUtils.substringBefore("", "XX"));
@@ -152,9 +152,9 @@ public class StringUtilsSubstringTest  {
     public void testSubstringAfter_StringString() {
         assertEquals("barXXbaz", StringUtils.substringAfter("fooXXbarXXbaz", "XX"));
 
-        assertEquals(null, StringUtils.substringAfter(null, null));
-        assertEquals(null, StringUtils.substringAfter(null, ""));
-        assertEquals(null, StringUtils.substringAfter(null, "XX"));
+        assertNull(StringUtils.substringAfter(null, null));
+        assertNull(StringUtils.substringAfter(null, ""));
+        assertNull(StringUtils.substringAfter(null, "XX"));
         assertEquals("", StringUtils.substringAfter("", null));
         assertEquals("", StringUtils.substringAfter("", ""));
         assertEquals("", StringUtils.substringAfter("", "XX"));
@@ -172,9 +172,9 @@ public class StringUtilsSubstringTest  {
     public void testSubstringBeforeLast_StringString() {
         assertEquals("fooXXbar", StringUtils.substringBeforeLast("fooXXbarXXbaz", "XX"));
 
-        assertEquals(null, StringUtils.substringBeforeLast(null, null));
-        assertEquals(null, StringUtils.substringBeforeLast(null, ""));
-        assertEquals(null, StringUtils.substringBeforeLast(null, "XX"));
+        assertNull(StringUtils.substringBeforeLast(null, null));
+        assertNull(StringUtils.substringBeforeLast(null, ""));
+        assertNull(StringUtils.substringBeforeLast(null, "XX"));
         assertEquals("", StringUtils.substringBeforeLast("", null));
         assertEquals("", StringUtils.substringBeforeLast("", ""));
         assertEquals("", StringUtils.substringBeforeLast("", "XX"));
@@ -196,9 +196,9 @@ public class StringUtilsSubstringTest  {
     public void testSubstringAfterLast_StringString() {
         assertEquals("baz", StringUtils.substringAfterLast("fooXXbarXXbaz", "XX"));
 
-        assertEquals(null, StringUtils.substringAfterLast(null, null));
-        assertEquals(null, StringUtils.substringAfterLast(null, ""));
-        assertEquals(null, StringUtils.substringAfterLast(null, "XX"));
+        assertNull(StringUtils.substringAfterLast(null, null));
+        assertNull(StringUtils.substringAfterLast(null, ""));
+        assertNull(StringUtils.substringAfterLast(null, "XX"));
         assertEquals("", StringUtils.substringAfterLast("", null));
         assertEquals("", StringUtils.substringAfterLast("", ""));
         assertEquals("", StringUtils.substringAfterLast("", "a"));
@@ -216,13 +216,13 @@ public class StringUtilsSubstringTest  {
     //-----------------------------------------------------------------------
     @Test
     public void testSubstringBetween_StringString() {
-        assertEquals(null, StringUtils.substringBetween(null, "tag"));
+        assertNull(StringUtils.substringBetween(null, "tag"));
         assertEquals("", StringUtils.substringBetween("", ""));
-        assertEquals(null, StringUtils.substringBetween("", "abc"));
+        assertNull(StringUtils.substringBetween("", "abc"));
         assertEquals("", StringUtils.substringBetween("    ", " "));
-        assertEquals(null, StringUtils.substringBetween("abc", null));
+        assertNull(StringUtils.substringBetween("abc", null));
         assertEquals("", StringUtils.substringBetween("abc", ""));
-        assertEquals(null, StringUtils.substringBetween("abc", "a"));
+        assertNull(StringUtils.substringBetween("abc", "a"));
         assertEquals("bc", StringUtils.substringBetween("abca", "a"));
         assertEquals("bc", StringUtils.substringBetween("abcabca", "a"));
         assertEquals("bar", StringUtils.substringBetween("\nbar\n", "\n"));
@@ -230,13 +230,13 @@ public class StringUtilsSubstringTest  {
 
     @Test
     public void testSubstringBetween_StringStringString() {
-        assertEquals(null, StringUtils.substringBetween(null, "", ""));
-        assertEquals(null, StringUtils.substringBetween("", null, ""));
-        assertEquals(null, StringUtils.substringBetween("", "", null));
+        assertNull(StringUtils.substringBetween(null, "", ""));
+        assertNull(StringUtils.substringBetween("", null, ""));
+        assertNull(StringUtils.substringBetween("", "", null));
         assertEquals("", StringUtils.substringBetween("", "", ""));
         assertEquals("", StringUtils.substringBetween("foo", "", ""));
-        assertEquals(null, StringUtils.substringBetween("foo", "", "]"));
-        assertEquals(null, StringUtils.substringBetween("foo", "[", "]"));
+        assertNull(StringUtils.substringBetween("foo", "", "]"));
+        assertNull(StringUtils.substringBetween("foo", "[", "]"));
         assertEquals("", StringUtils.substringBetween("    ", " ", "  "));
         assertEquals("bar", StringUtils.substringBetween("<foo>bar</foo>", "<foo>", "</foo>") );
     }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/ae924788/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/StringUtilsTest.java b/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
index 615030e..451202e 100644
--- a/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
@@ -1164,10 +1164,10 @@ public class StringUtilsTest {
 
     @Test
     public void testReplaceIgnoreCase_StringStringString() {
-        assertEquals(null, StringUtils.replaceIgnoreCase(null, null, null));
-        assertEquals(null, StringUtils.replaceIgnoreCase(null, null, "any"));
-        assertEquals(null, StringUtils.replaceIgnoreCase(null, "any", null));
-        assertEquals(null, StringUtils.replaceIgnoreCase(null, "any", "any"));
+        assertNull(StringUtils.replaceIgnoreCase(null, null, null));
+        assertNull(StringUtils.replaceIgnoreCase(null, null, "any"));
+        assertNull(StringUtils.replaceIgnoreCase(null, "any", null));
+        assertNull(StringUtils.replaceIgnoreCase(null, "any", "any"));
 
         assertEquals("", StringUtils.replaceIgnoreCase("", null, null));
         assertEquals("", StringUtils.replaceIgnoreCase("", null, "any"));
@@ -1313,10 +1313,10 @@ public class StringUtilsTest {
 
     @Test
     public void testReplaceIgnoreCase_StringStringStringInt() {
-        assertEquals(null, StringUtils.replaceIgnoreCase(null, null, null, 2));
-        assertEquals(null, StringUtils.replaceIgnoreCase(null, null, "any", 2));
-        assertEquals(null, StringUtils.replaceIgnoreCase(null, "any", null, 2));
-        assertEquals(null, StringUtils.replaceIgnoreCase(null, "any", "any", 2));
+        assertNull(StringUtils.replaceIgnoreCase(null, null, null, 2));
+        assertNull(StringUtils.replaceIgnoreCase(null, null, "any", 2));
+        assertNull(StringUtils.replaceIgnoreCase(null, "any", null, 2));
+        assertNull(StringUtils.replaceIgnoreCase(null, "any", "any", 2));
 
         assertEquals("", StringUtils.replaceIgnoreCase("", null, null, 2));
         assertEquals("", StringUtils.replaceIgnoreCase("", null, "any", 2));
@@ -1370,10 +1370,10 @@ public class StringUtilsTest {
 
     @Test
     public void testReplaceOnceIgnoreCase_StringStringString() {
-        assertEquals(null, StringUtils.replaceOnceIgnoreCase(null, null, null));
-        assertEquals(null, StringUtils.replaceOnceIgnoreCase(null, null, "any"));
-        assertEquals(null, StringUtils.replaceOnceIgnoreCase(null, "any", null));
-        assertEquals(null, StringUtils.replaceOnceIgnoreCase(null, "any", "any"));
+        assertNull(StringUtils.replaceOnceIgnoreCase(null, null, null));
+        assertNull(StringUtils.replaceOnceIgnoreCase(null, null, "any"));
+        assertNull(StringUtils.replaceOnceIgnoreCase(null, "any", null));
+        assertNull(StringUtils.replaceOnceIgnoreCase(null, "any", "any"));
 
         assertEquals("", StringUtils.replaceOnceIgnoreCase("", null, null));
         assertEquals("", StringUtils.replaceOnceIgnoreCase("", null, "any"));
@@ -1823,7 +1823,7 @@ public class StringUtilsTest {
     //-----------------------------------------------------------------------
     @Test
     public void testRotate_StringInt() {
-        assertEquals(null, StringUtils.rotate(null, 1));
+        assertNull(StringUtils.rotate(null, 1));
         assertEquals("", StringUtils.rotate("", 1));
         assertEquals("abcdefg", StringUtils.rotate("abcdefg", 0));
         assertEquals("fgabcde", StringUtils.rotate("abcdefg", 2));
@@ -2721,9 +2721,9 @@ public class StringUtilsTest {
     @Test
     public void testRemoveIgnoreCase_String() {
         // StringUtils.removeIgnoreCase(null, *) = null
-        assertEquals(null, StringUtils.removeIgnoreCase(null, null));
-        assertEquals(null, StringUtils.removeIgnoreCase(null, ""));
-        assertEquals(null, StringUtils.removeIgnoreCase(null, "a"));
+        assertNull(StringUtils.removeIgnoreCase(null, null));
+        assertNull(StringUtils.removeIgnoreCase(null, ""));
+        assertNull(StringUtils.removeIgnoreCase(null, "a"));
 
         // StringUtils.removeIgnoreCase("", *) = ""
         assertEquals("", StringUtils.removeIgnoreCase("", null));
@@ -2731,12 +2731,12 @@ public class StringUtilsTest {
         assertEquals("", StringUtils.removeIgnoreCase("", "a"));
 
         // StringUtils.removeIgnoreCase(*, null) = *
-        assertEquals(null, StringUtils.removeIgnoreCase(null, null));
+        assertNull(StringUtils.removeIgnoreCase(null, null));
         assertEquals("", StringUtils.removeIgnoreCase("", null));
         assertEquals("a", StringUtils.removeIgnoreCase("a", null));
 
         // StringUtils.removeIgnoreCase(*, "") = *
-        assertEquals(null, StringUtils.removeIgnoreCase(null, ""));
+        assertNull(StringUtils.removeIgnoreCase(null, ""));
         assertEquals("", StringUtils.removeIgnoreCase("", ""));
         assertEquals("a", StringUtils.removeIgnoreCase("a", ""));
 
@@ -3167,7 +3167,7 @@ public class StringUtilsTest {
         assertNull(StringUtils.wrap(null, ""));
         assertNull(StringUtils.wrap(null, "1"));
 
-        assertEquals(null, StringUtils.wrap(null, null));
+        assertNull(StringUtils.wrap(null, null));
         assertEquals("", StringUtils.wrap("", ""));
         assertEquals("ab", StringUtils.wrap("ab", null));
         assertEquals("xabx", StringUtils.wrap("ab", "x"));
@@ -3232,7 +3232,7 @@ public class StringUtilsTest {
 
     @Test
     public void testGetDigits() {
-        assertEquals(null, StringUtils.getDigits(null));
+        assertNull(StringUtils.getDigits(null));
         assertEquals("", StringUtils.getDigits(""));
         assertEquals("", StringUtils.getDigits("abc"));
         assertEquals("1000", StringUtils.getDigits("1000$"));

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/ae924788/src/test/java/org/apache/commons/lang3/StringUtilsTrimStripTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/StringUtilsTrimStripTest.java b/src/test/java/org/apache/commons/lang3/StringUtilsTrimStripTest.java
index d9fdb74..9256527 100644
--- a/src/test/java/org/apache/commons/lang3/StringUtilsTrimStripTest.java
+++ b/src/test/java/org/apache/commons/lang3/StringUtilsTrimStripTest.java
@@ -38,7 +38,7 @@ public class StringUtilsTrimStripTest  {
         assertEquals("", StringUtils.trim(StringUtilsTest.TRIMMABLE));
         assertEquals(StringUtilsTest.NON_TRIMMABLE, StringUtils.trim(StringUtilsTest.NON_TRIMMABLE));
         assertEquals("", StringUtils.trim(""));
-        assertEquals(null, StringUtils.trim(null));
+        assertNull(StringUtils.trim(null));
     }
 
     @Test
@@ -47,11 +47,11 @@ public class StringUtilsTrimStripTest  {
         assertEquals(FOO, StringUtils.trimToNull(" " + FOO + "  "));
         assertEquals(FOO, StringUtils.trimToNull(" " + FOO));
         assertEquals(FOO, StringUtils.trimToNull(FOO + ""));
-        assertEquals(null, StringUtils.trimToNull(" \t\r\n\b "));
-        assertEquals(null, StringUtils.trimToNull(StringUtilsTest.TRIMMABLE));
+        assertNull(StringUtils.trimToNull(" \t\r\n\b "));
+        assertNull(StringUtils.trimToNull(StringUtilsTest.TRIMMABLE));
         assertEquals(StringUtilsTest.NON_TRIMMABLE, StringUtils.trimToNull(StringUtilsTest.NON_TRIMMABLE));
-        assertEquals(null, StringUtils.trimToNull(""));
-        assertEquals(null, StringUtils.trimToNull(null));
+        assertNull(StringUtils.trimToNull(""));
+        assertNull(StringUtils.trimToNull(null));
     }
 
     @Test
@@ -70,7 +70,7 @@ public class StringUtilsTrimStripTest  {
     //-----------------------------------------------------------------------
     @Test
     public void testStrip_String() {
-        assertEquals(null, StringUtils.strip(null));
+        assertNull(StringUtils.strip(null));
         assertEquals("", StringUtils.strip(""));
         assertEquals("", StringUtils.strip("        "));
         assertEquals("abc", StringUtils.strip("  abc  "));
@@ -80,10 +80,10 @@ public class StringUtilsTrimStripTest  {
 
     @Test
     public void testStripToNull_String() {
-        assertEquals(null, StringUtils.stripToNull(null));
-        assertEquals(null, StringUtils.stripToNull(""));
-        assertEquals(null, StringUtils.stripToNull("        "));
-        assertEquals(null, StringUtils.stripToNull(StringUtilsTest.WHITESPACE));
+        assertNull(StringUtils.stripToNull(null));
+        assertNull(StringUtils.stripToNull(""));
+        assertNull(StringUtils.stripToNull("        "));
+        assertNull(StringUtils.stripToNull(StringUtilsTest.WHITESPACE));
         assertEquals("ab c", StringUtils.stripToNull("  ab c  "));
         assertEquals(StringUtilsTest.NON_WHITESPACE,
             StringUtils.stripToNull(StringUtilsTest.WHITESPACE + StringUtilsTest.NON_WHITESPACE + StringUtilsTest.WHITESPACE));
@@ -103,7 +103,7 @@ public class StringUtilsTrimStripTest  {
     @Test
     public void testStrip_StringString() {
         // null strip
-        assertEquals(null, StringUtils.strip(null, null));
+        assertNull(StringUtils.strip(null, null));
         assertEquals("", StringUtils.strip("", null));
         assertEquals("", StringUtils.strip("        ", null));
         assertEquals("abc", StringUtils.strip("  abc  ", null));
@@ -111,20 +111,20 @@ public class StringUtilsTrimStripTest  {
             StringUtils.strip(StringUtilsTest.WHITESPACE + StringUtilsTest.NON_WHITESPACE + StringUtilsTest.WHITESPACE, null));
 
         // "" strip
-        assertEquals(null, StringUtils.strip(null, ""));
+        assertNull(StringUtils.strip(null, ""));
         assertEquals("", StringUtils.strip("", ""));
         assertEquals("        ", StringUtils.strip("        ", ""));
         assertEquals("  abc  ", StringUtils.strip("  abc  ", ""));
         assertEquals(StringUtilsTest.WHITESPACE, StringUtils.strip(StringUtilsTest.WHITESPACE, ""));
 
         // " " strip
-        assertEquals(null, StringUtils.strip(null, " "));
+        assertNull(StringUtils.strip(null, " "));
         assertEquals("", StringUtils.strip("", " "));
         assertEquals("", StringUtils.strip("        ", " "));
         assertEquals("abc", StringUtils.strip("  abc  ", " "));
 
         // "ab" strip
-        assertEquals(null, StringUtils.strip(null, "ab"));
+        assertNull(StringUtils.strip(null, "ab"));
         assertEquals("", StringUtils.strip("", "ab"));
         assertEquals("        ", StringUtils.strip("        ", "ab"));
         assertEquals("  abc  ", StringUtils.strip("  abc  ", "ab"));
@@ -135,7 +135,7 @@ public class StringUtilsTrimStripTest  {
     @Test
     public void testStripStart_StringString() {
         // null stripStart
-        assertEquals(null, StringUtils.stripStart(null, null));
+        assertNull(StringUtils.stripStart(null, null));
         assertEquals("", StringUtils.stripStart("", null));
         assertEquals("", StringUtils.stripStart("        ", null));
         assertEquals("abc  ", StringUtils.stripStart("  abc  ", null));
@@ -143,20 +143,20 @@ public class StringUtilsTrimStripTest  {
             StringUtils.stripStart(StringUtilsTest.WHITESPACE + StringUtilsTest.NON_WHITESPACE + StringUtilsTest.WHITESPACE, null));
 
         // "" stripStart
-        assertEquals(null, StringUtils.stripStart(null, ""));
+        assertNull(StringUtils.stripStart(null, ""));
         assertEquals("", StringUtils.stripStart("", ""));
         assertEquals("        ", StringUtils.stripStart("        ", ""));
         assertEquals("  abc  ", StringUtils.stripStart("  abc  ", ""));
         assertEquals(StringUtilsTest.WHITESPACE, StringUtils.stripStart(StringUtilsTest.WHITESPACE, ""));
 
         // " " stripStart
-        assertEquals(null, StringUtils.stripStart(null, " "));
+        assertNull(StringUtils.stripStart(null, " "));
         assertEquals("", StringUtils.stripStart("", " "));
         assertEquals("", StringUtils.stripStart("        ", " "));
         assertEquals("abc  ", StringUtils.stripStart("  abc  ", " "));
 
         // "ab" stripStart
-        assertEquals(null, StringUtils.stripStart(null, "ab"));
+        assertNull(StringUtils.stripStart(null, "ab"));
         assertEquals("", StringUtils.stripStart("", "ab"));
         assertEquals("        ", StringUtils.stripStart("        ", "ab"));
         assertEquals("  abc  ", StringUtils.stripStart("  abc  ", "ab"));
@@ -167,7 +167,7 @@ public class StringUtilsTrimStripTest  {
     @Test
     public void testStripEnd_StringString() {
         // null stripEnd
-        assertEquals(null, StringUtils.stripEnd(null, null));
+        assertNull(StringUtils.stripEnd(null, null));
         assertEquals("", StringUtils.stripEnd("", null));
         assertEquals("", StringUtils.stripEnd("        ", null));
         assertEquals("  abc", StringUtils.stripEnd("  abc  ", null));
@@ -175,20 +175,20 @@ public class StringUtilsTrimStripTest  {
             StringUtils.stripEnd(StringUtilsTest.WHITESPACE + StringUtilsTest.NON_WHITESPACE + StringUtilsTest.WHITESPACE, null));
 
         // "" stripEnd
-        assertEquals(null, StringUtils.stripEnd(null, ""));
+        assertNull(StringUtils.stripEnd(null, ""));
         assertEquals("", StringUtils.stripEnd("", ""));
         assertEquals("        ", StringUtils.stripEnd("        ", ""));
         assertEquals("  abc  ", StringUtils.stripEnd("  abc  ", ""));
         assertEquals(StringUtilsTest.WHITESPACE, StringUtils.stripEnd(StringUtilsTest.WHITESPACE, ""));
 
         // " " stripEnd
-        assertEquals(null, StringUtils.stripEnd(null, " "));
+        assertNull(StringUtils.stripEnd(null, " "));
         assertEquals("", StringUtils.stripEnd("", " "));
         assertEquals("", StringUtils.stripEnd("        ", " "));
         assertEquals("  abc", StringUtils.stripEnd("  abc  ", " "));
 
         // "ab" stripEnd
-        assertEquals(null, StringUtils.stripEnd(null, "ab"));
+        assertNull(StringUtils.stripEnd(null, "ab"));
         assertEquals("", StringUtils.stripEnd("", "ab"));
         assertEquals("        ", StringUtils.stripEnd("        ", "ab"));
         assertEquals("  abc  ", StringUtils.stripEnd("  abc  ", "ab"));

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/ae924788/src/test/java/org/apache/commons/lang3/mutable/MutableObjectTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/mutable/MutableObjectTest.java b/src/test/java/org/apache/commons/lang3/mutable/MutableObjectTest.java
index 5050477..09e9b7d 100644
--- a/src/test/java/org/apache/commons/lang3/mutable/MutableObjectTest.java
+++ b/src/test/java/org/apache/commons/lang3/mutable/MutableObjectTest.java
@@ -18,6 +18,7 @@ package org.apache.commons.lang3.mutable;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 
@@ -34,7 +35,7 @@ public class MutableObjectTest {
     // ----------------------------------------------------------------
     @Test
     public void testConstructors() {
-        assertEquals(null, new MutableObject<String>().getValue());
+        assertNull(new MutableObject<String>().getValue());
 
         final Integer i = Integer.valueOf(6);
         assertSame(i, new MutableObject<>(i).getValue());
@@ -45,7 +46,7 @@ public class MutableObjectTest {
     @Test
     public void testGetSet() {
         final MutableObject<String> mutNum = new MutableObject<>();
-        assertEquals(null, new MutableObject<>().getValue());
+        assertNull(new MutableObject<>().getValue());
 
         mutNum.setValue("HELLO");
         assertSame("HELLO", mutNum.getValue());

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/ae924788/src/test/java/org/apache/commons/lang3/text/StrBuilderTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/text/StrBuilderTest.java b/src/test/java/org/apache/commons/lang3/text/StrBuilderTest.java
index 435ae42..a17782d 100644
--- a/src/test/java/org/apache/commons/lang3/text/StrBuilderTest.java
+++ b/src/test/java/org/apache/commons/lang3/text/StrBuilderTest.java
@@ -23,6 +23,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
@@ -184,7 +185,7 @@ public class StrBuilderTest {
     @Test
     public void testGetSetNewLineText() {
         final StrBuilder sb = new StrBuilder();
-        assertEquals(null, sb.getNewLineText());
+        assertNull(sb.getNewLineText());
 
         sb.setNewLineText("#");
         assertEquals("#", sb.getNewLineText());
@@ -193,26 +194,26 @@ public class StrBuilderTest {
         assertEquals("", sb.getNewLineText());
 
         sb.setNewLineText(null);
-        assertEquals(null, sb.getNewLineText());
+        assertNull(sb.getNewLineText());
     }
 
     //-----------------------------------------------------------------------
     @Test
     public void testGetSetNullText() {
         final StrBuilder sb = new StrBuilder();
-        assertEquals(null, sb.getNullText());
+        assertNull(sb.getNullText());
 
         sb.setNullText("null");
         assertEquals("null", sb.getNullText());
 
         sb.setNullText("");
-        assertEquals(null, sb.getNullText());
+        assertNull(sb.getNullText());
 
         sb.setNullText("NULL");
         assertEquals("NULL", sb.getNullText());
 
         sb.setNullText(null);
-        assertEquals(null, sb.getNullText());
+        assertNull(sb.getNullText());
     }
 
     //-----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/ae924788/src/test/java/org/apache/commons/lang3/text/StrLookupTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/text/StrLookupTest.java b/src/test/java/org/apache/commons/lang3/text/StrLookupTest.java
index 29bd822..47a2d58 100644
--- a/src/test/java/org/apache/commons/lang3/text/StrLookupTest.java
+++ b/src/test/java/org/apache/commons/lang3/text/StrLookupTest.java
@@ -18,6 +18,7 @@
 package org.apache.commons.lang3.text;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.fail;
 
 import java.util.HashMap;
@@ -35,16 +36,16 @@ public class StrLookupTest  {
     //-----------------------------------------------------------------------
     @Test
     public void testNoneLookup() {
-        assertEquals(null, StrLookup.noneLookup().lookup(null));
-        assertEquals(null, StrLookup.noneLookup().lookup(""));
-        assertEquals(null, StrLookup.noneLookup().lookup("any"));
+        assertNull(StrLookup.noneLookup().lookup(null));
+        assertNull(StrLookup.noneLookup().lookup(""));
+        assertNull(StrLookup.noneLookup().lookup("any"));
     }
 
     @Test
     public void testSystemPropertiesLookup() {
         assertEquals(System.getProperty("os.name"), StrLookup.systemPropertiesLookup().lookup("os.name"));
-        assertEquals(null, StrLookup.systemPropertiesLookup().lookup(""));
-        assertEquals(null, StrLookup.systemPropertiesLookup().lookup("other"));
+        assertNull(StrLookup.systemPropertiesLookup().lookup(""));
+        assertNull(StrLookup.systemPropertiesLookup().lookup("other"));
         try {
             StrLookup.systemPropertiesLookup().lookup(null);
             fail();
@@ -101,17 +102,17 @@ public class StrLookupTest  {
         map.put("number", Integer.valueOf(2));
         assertEquals("value", StrLookup.mapLookup(map).lookup("key"));
         assertEquals("2", StrLookup.mapLookup(map).lookup("number"));
-        assertEquals(null, StrLookup.mapLookup(map).lookup(null));
-        assertEquals(null, StrLookup.mapLookup(map).lookup(""));
-        assertEquals(null, StrLookup.mapLookup(map).lookup("other"));
+        assertNull(StrLookup.mapLookup(map).lookup(null));
+        assertNull(StrLookup.mapLookup(map).lookup(""));
+        assertNull(StrLookup.mapLookup(map).lookup("other"));
     }
 
     @Test
     public void testMapLookup_nullMap() {
         final Map<String, ?> map = null;
-        assertEquals(null, StrLookup.mapLookup(map).lookup(null));
-        assertEquals(null, StrLookup.mapLookup(map).lookup(""));
-        assertEquals(null, StrLookup.mapLookup(map).lookup("any"));
+        assertNull(StrLookup.mapLookup(map).lookup(null));
+        assertNull(StrLookup.mapLookup(map).lookup(""));
+        assertNull(StrLookup.mapLookup(map).lookup("any"));
     }
 
 }

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/ae924788/src/test/java/org/apache/commons/lang3/text/StrSubstitutorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/text/StrSubstitutorTest.java b/src/test/java/org/apache/commons/lang3/text/StrSubstitutorTest.java
index 1e9c512..78c5500 100644
--- a/src/test/java/org/apache/commons/lang3/text/StrSubstitutorTest.java
+++ b/src/test/java/org/apache/commons/lang3/text/StrSubstitutorTest.java
@@ -717,15 +717,15 @@ public class StrSubstitutorTest {
         final StrSubstitutor sub = new StrSubstitutor(values);
 
         if (replaceTemplate == null) {
-            assertEquals(null, sub.replace((String) null));
-            assertEquals(null, sub.replace((String) null, 0, 100));
-            assertEquals(null, sub.replace((char[]) null));
-            assertEquals(null, sub.replace((char[]) null, 0, 100));
-            assertEquals(null, sub.replace((StringBuffer) null));
-            assertEquals(null, sub.replace((StringBuffer) null, 0, 100));
-            assertEquals(null, sub.replace((StrBuilder) null));
-            assertEquals(null, sub.replace((StrBuilder) null, 0, 100));
-            assertEquals(null, sub.replace((Object) null));
+            assertNull(sub.replace((String) null));
+            assertNull(sub.replace((String) null, 0, 100));
+            assertNull(sub.replace((char[]) null));
+            assertNull(sub.replace((char[]) null, 0, 100));
+            assertNull(sub.replace((StringBuffer) null));
+            assertNull(sub.replace((StringBuffer) null, 0, 100));
+            assertNull(sub.replace((StrBuilder) null));
+            assertNull(sub.replace((StrBuilder) null, 0, 100));
+            assertNull(sub.replace((Object) null));
             assertFalse(sub.replaceIn((StringBuffer) null));
             assertFalse(sub.replaceIn((StringBuffer) null, 0, 100));
             assertFalse(sub.replaceIn((StrBuilder) null));

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/ae924788/src/test/java/org/apache/commons/lang3/text/StrTokenizerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/text/StrTokenizerTest.java b/src/test/java/org/apache/commons/lang3/text/StrTokenizerTest.java
index 7325b7a..7ee0ae8 100644
--- a/src/test/java/org/apache/commons/lang3/text/StrTokenizerTest.java
+++ b/src/test/java/org/apache/commons/lang3/text/StrTokenizerTest.java
@@ -319,7 +319,7 @@ public class StrTokenizerTest {
         tok.setIgnoreEmptyTokens(false);
         tok.setEmptyTokenAsNull(true);
         assertEquals("a", tok.next());
-        assertEquals(null, tok.next());
+        assertNull(tok.next());
         assertEquals("b", tok.next());
         assertEquals("c", tok.next());
         assertFalse(tok.hasNext());
@@ -343,7 +343,7 @@ public class StrTokenizerTest {
         tok.setEmptyTokenAsNull(true);
         assertEquals("a", tok.next());
         assertEquals("b", tok.next());
-        assertEquals(null, tok.next());
+        assertNull(tok.next());
         assertFalse(tok.hasNext());
     }
 
@@ -414,7 +414,7 @@ public class StrTokenizerTest {
         tok.setEmptyTokenAsNull(true);
         assertEquals("a", tok.next());
         assertEquals("b", tok.next());
-        assertEquals(null, tok.next());
+        assertNull(tok.next());
         assertFalse(tok.hasNext());
     }
 
@@ -427,7 +427,7 @@ public class StrTokenizerTest {
         tok.setEmptyTokenAsNull(true);
         assertEquals("a", tok.next());
         assertEquals("b", tok.next());
-        assertEquals(null, tok.next());
+        assertNull(tok.next());
         assertFalse(tok.hasNext());
     }
 
@@ -440,7 +440,7 @@ public class StrTokenizerTest {
         tok.setEmptyTokenAsNull(true);
         assertEquals("a", tok.next());
         assertEquals("b", tok.next());
-        assertEquals(null, tok.next());
+        assertNull(tok.next());
         assertFalse(tok.hasNext());
     }
 
@@ -454,7 +454,7 @@ public class StrTokenizerTest {
         tok.setEmptyTokenAsNull(true);
         assertEquals("a", tok.next());
         assertEquals("bc", tok.next());
-        assertEquals(null, tok.next());
+        assertNull(tok.next());
         assertFalse(tok.hasNext());
     }
 
@@ -468,7 +468,7 @@ public class StrTokenizerTest {
         tok.setEmptyTokenAsNull(true);
         assertEquals("a", tok.next());
         assertEquals("bc", tok.next());
-        assertEquals(null, tok.next());
+        assertNull(tok.next());
         assertFalse(tok.hasNext());
     }
 
@@ -495,7 +495,7 @@ public class StrTokenizerTest {
         tok.setEmptyTokenAsNull(true);
         assertEquals("a", tok.next());
         assertEquals("bIGNOREcd", tok.next());
-        assertEquals(null, tok.next());
+        assertNull(tok.next());
         assertFalse(tok.hasNext());
     }
 
@@ -539,7 +539,7 @@ public class StrTokenizerTest {
         this.checkClone(tokenizer);
         assertFalse(tokenizer.hasNext());
         assertFalse(tokenizer.hasPrevious());
-        assertEquals(null, tokenizer.nextToken());
+        assertNull(tokenizer.nextToken());
         assertEquals(0, tokenizer.size());
         try {
             tokenizer.next();
@@ -557,7 +557,7 @@ public class StrTokenizerTest {
         assertEquals(input, tok.getContent());
 
         tok = new StrTokenizer();
-        assertEquals(null, tok.getContent());
+        assertNull(tok.getContent());
     }
 
     //-----------------------------------------------------------------------
@@ -598,14 +598,14 @@ public class StrTokenizerTest {
     public void testCloneNull() {
         final StrTokenizer tokenizer = new StrTokenizer((char[]) null);
         // Start sanity check
-        assertEquals(null, tokenizer.nextToken());
+        assertNull(tokenizer.nextToken());
         tokenizer.reset();
-        assertEquals(null, tokenizer.nextToken());
+        assertNull(tokenizer.nextToken());
         // End sanity check
         final StrTokenizer clonedTokenizer = (StrTokenizer) tokenizer.clone();
         tokenizer.reset();
-        assertEquals(null, tokenizer.nextToken());
-        assertEquals(null, clonedTokenizer.nextToken());
+        assertNull(tokenizer.nextToken());
+        assertNull(clonedTokenizer.nextToken());
     }
 
     @Test
@@ -780,14 +780,14 @@ public class StrTokenizerTest {
         this.checkClone(tokenizer);
         assertEquals(-1, tokenizer.previousIndex());
         assertEquals(0, tokenizer.nextIndex());
-        assertEquals(null, tokenizer.previousToken());
+        assertNull(tokenizer.previousToken());
         assertEquals("A", tokenizer.nextToken());
         assertEquals(1, tokenizer.nextIndex());
         assertEquals("b", tokenizer.nextToken());
         assertEquals(2, tokenizer.nextIndex());
         assertEquals("c", tokenizer.nextToken());
         assertEquals(3, tokenizer.nextIndex());
-        assertEquals(null, tokenizer.nextToken());
+        assertNull(tokenizer.nextToken());
         assertEquals(3, tokenizer.nextIndex());
         assertEquals("c", tokenizer.previousToken());
         assertEquals(2, tokenizer.nextIndex());
@@ -795,7 +795,7 @@ public class StrTokenizerTest {
         assertEquals(1, tokenizer.nextIndex());
         assertEquals("A", tokenizer.previousToken());
         assertEquals(0, tokenizer.nextIndex());
-        assertEquals(null, tokenizer.previousToken());
+        assertNull(tokenizer.previousToken());
         assertEquals(0, tokenizer.nextIndex());
         assertEquals(-1, tokenizer.previousIndex());
         assertEquals(3, tokenizer.size());

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/ae924788/src/test/java/org/apache/commons/lang3/text/WordUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/text/WordUtilsTest.java b/src/test/java/org/apache/commons/lang3/text/WordUtilsTest.java
index 32cf99a..b311b30 100644
--- a/src/test/java/org/apache/commons/lang3/text/WordUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/text/WordUtilsTest.java
@@ -19,6 +19,7 @@ package org.apache.commons.lang3.text;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
 import java.lang.reflect.Constructor;
@@ -46,8 +47,8 @@ public class WordUtilsTest {
     //-----------------------------------------------------------------------
     @Test
     public void testWrap_StringInt() {
-        assertEquals(null, WordUtils.wrap(null, 20));
-        assertEquals(null, WordUtils.wrap(null, -1));
+        assertNull(WordUtils.wrap(null, 20));
+        assertNull(WordUtils.wrap(null, -1));
 
         assertEquals("", WordUtils.wrap("", 20));
         assertEquals("", WordUtils.wrap("", -1));
@@ -80,12 +81,12 @@ public class WordUtilsTest {
 
     @Test
     public void testWrap_StringIntStringBoolean() {
-        assertEquals(null, WordUtils.wrap(null, 20, "\n", false));
-        assertEquals(null, WordUtils.wrap(null, 20, "\n", true));
-        assertEquals(null, WordUtils.wrap(null, 20, null, true));
-        assertEquals(null, WordUtils.wrap(null, 20, null, false));
-        assertEquals(null, WordUtils.wrap(null, -1, null, true));
-        assertEquals(null, WordUtils.wrap(null, -1, null, false));
+        assertNull(WordUtils.wrap(null, 20, "\n", false));
+        assertNull(WordUtils.wrap(null, 20, "\n", true));
+        assertNull(WordUtils.wrap(null, 20, null, true));
+        assertNull(WordUtils.wrap(null, 20, null, false));
+        assertNull(WordUtils.wrap(null, -1, null, true));
+        assertNull(WordUtils.wrap(null, -1, null, false));
 
         assertEquals("", WordUtils.wrap("", 20, "\n", false));
         assertEquals("", WordUtils.wrap("", 20, "\n", true));
@@ -184,7 +185,7 @@ public class WordUtilsTest {
     //-----------------------------------------------------------------------
     @Test
     public void testCapitalize_String() {
-        assertEquals(null, WordUtils.capitalize(null));
+        assertNull(WordUtils.capitalize(null));
         assertEquals("", WordUtils.capitalize(""));
         assertEquals("  ", WordUtils.capitalize("  "));
 
@@ -198,7 +199,7 @@ public class WordUtilsTest {
 
     @Test
     public void testCapitalizeWithDelimiters_String() {
-        assertEquals(null, WordUtils.capitalize(null, null));
+        assertNull(WordUtils.capitalize(null, null));
         assertEquals("", WordUtils.capitalize("", new char[0]));
         assertEquals("  ", WordUtils.capitalize("  ", new char[0]));
 
@@ -216,7 +217,7 @@ public class WordUtilsTest {
 
     @Test
     public void testCapitalizeFully_String() {
-        assertEquals(null, WordUtils.capitalizeFully(null));
+        assertNull(WordUtils.capitalizeFully(null));
         assertEquals("", WordUtils.capitalizeFully(""));
         assertEquals("  ", WordUtils.capitalizeFully("  "));
 
@@ -230,7 +231,7 @@ public class WordUtilsTest {
 
     @Test
     public void testCapitalizeFullyWithDelimiters_String() {
-        assertEquals(null, WordUtils.capitalizeFully(null, null));
+        assertNull(WordUtils.capitalizeFully(null, null));
         assertEquals("", WordUtils.capitalizeFully("", new char[0]));
         assertEquals("  ", WordUtils.capitalizeFully("  ", new char[0]));
 
@@ -268,7 +269,7 @@ public class WordUtilsTest {
 
     @Test
     public void testUncapitalize_String() {
-        assertEquals(null, WordUtils.uncapitalize(null));
+        assertNull(WordUtils.uncapitalize(null));
         assertEquals("", WordUtils.uncapitalize(""));
         assertEquals("  ", WordUtils.uncapitalize("  "));
 
@@ -282,7 +283,7 @@ public class WordUtilsTest {
 
     @Test
     public void testUncapitalizeWithDelimiters_String() {
-        assertEquals(null, WordUtils.uncapitalize(null, null));
+        assertNull(WordUtils.uncapitalize(null, null));
         assertEquals("", WordUtils.uncapitalize("", new char[0]));
         assertEquals("  ", WordUtils.uncapitalize("  ", new char[0]));
 
@@ -301,7 +302,7 @@ public class WordUtilsTest {
     //-----------------------------------------------------------------------
     @Test
     public void testInitials_String() {
-        assertEquals(null, WordUtils.initials(null));
+        assertNull(WordUtils.initials(null));
         assertEquals("", WordUtils.initials(""));
         assertEquals("", WordUtils.initials("  "));
 
@@ -318,7 +319,7 @@ public class WordUtilsTest {
     @Test
     public void testInitials_String_charArray() {
         char[] array = null;
-        assertEquals(null, WordUtils.initials(null, array));
+        assertNull(WordUtils.initials(null, array));
         assertEquals("", WordUtils.initials("", array));
         assertEquals("", WordUtils.initials("  ", array));
         assertEquals("I", WordUtils.initials("I", array));
@@ -332,7 +333,7 @@ public class WordUtilsTest {
         assertEquals("iah1", WordUtils.initials("i am here 123", array));
 
         array = new char[0];
-        assertEquals(null, WordUtils.initials(null, array));
+        assertNull(WordUtils.initials(null, array));
         assertEquals("", WordUtils.initials("", array));
         assertEquals("", WordUtils.initials("  ", array));
         assertEquals("", WordUtils.initials("I", array));
@@ -346,7 +347,7 @@ public class WordUtilsTest {
         assertEquals("", WordUtils.initials("i am here 123", array));
 
         array = " ".toCharArray();
-        assertEquals(null, WordUtils.initials(null, array));
+        assertNull(WordUtils.initials(null, array));
         assertEquals("", WordUtils.initials("", array));
         assertEquals("", WordUtils.initials("  ", array));
         assertEquals("I", WordUtils.initials("I", array));
@@ -360,7 +361,7 @@ public class WordUtilsTest {
         assertEquals("iah1", WordUtils.initials("i am here 123", array));
 
         array = " .".toCharArray();
-        assertEquals(null, WordUtils.initials(null, array));
+        assertNull(WordUtils.initials(null, array));
         assertEquals("", WordUtils.initials("", array));
         assertEquals("", WordUtils.initials("  ", array));
         assertEquals("I", WordUtils.initials("I", array));
@@ -373,7 +374,7 @@ public class WordUtilsTest {
         assertEquals("iah1", WordUtils.initials("i am here 123", array));
 
         array = " .'".toCharArray();
-        assertEquals(null, WordUtils.initials(null, array));
+        assertNull(WordUtils.initials(null, array));
         assertEquals("", WordUtils.initials("", array));
         assertEquals("", WordUtils.initials("  ", array));
         assertEquals("I", WordUtils.initials("I", array));
@@ -386,7 +387,7 @@ public class WordUtilsTest {
         assertEquals("iah1", WordUtils.initials("i am here 123", array));
 
         array = "SIJo1".toCharArray();
-        assertEquals(null, WordUtils.initials(null, array));
+        assertNull(WordUtils.initials(null, array));
         assertEquals("", WordUtils.initials("", array));
         assertEquals(" ", WordUtils.initials("  ", array));
         assertEquals("", WordUtils.initials("I", array));
@@ -402,7 +403,7 @@ public class WordUtilsTest {
     // -----------------------------------------------------------------------
     @Test
     public void testSwapCase_String() {
-        assertEquals(null, WordUtils.swapCase(null));
+        assertNull(WordUtils.swapCase(null));
         assertEquals("", WordUtils.swapCase(""));
         assertEquals("  ", WordUtils.swapCase("  "));
 


Mime
View raw message