commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pascalschumac...@apache.org
Subject [4/4] [text] apply (relaxed) checkstyle rules to test and fix (or suppress) existing violations (closes #71)
Date Thu, 26 Oct 2017 08:07:06 GMT
apply (relaxed) checkstyle rules to test and fix (or suppress) existing violations (closes  #71)


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

Branch: refs/heads/master
Commit: 6665a02096fc56ad5a60943f65d6f75aea389cf7
Parents: a200b34
Author: Pascal Schumacher <pascalschumacher@gmx.net>
Authored: Sun Oct 15 19:57:21 2017 +0200
Committer: Pascal Schumacher <pascalschumacher@gmx.net>
Committed: Thu Oct 26 10:06:43 2017 +0200

----------------------------------------------------------------------
 checkstyle-suppressions.xml                     |   8 +
 pom.xml                                         |   2 +
 .../org/apache/commons/text/StrBuilder.java     |   4 +-
 .../commons/text/AlphabetConverterTest.java     | 126 +++--
 .../org/apache/commons/text/CaseUtilsTest.java  |  10 +-
 .../commons/text/CharacterPredicatesTest.java   |   7 +-
 .../commons/text/CompositeFormatTest.java       |  16 +-
 .../commons/text/ExtendedMessageFormatTest.java |  51 +-
 .../commons/text/FormattableUtilsTest.java      |  30 +-
 .../commons/text/RandomStringGeneratorTest.java |  33 +-
 .../text/StrBuilderAppendInsertTest.java        |  40 +-
 .../org/apache/commons/text/StrBuilderTest.java | 503 ++++++++++---------
 .../org/apache/commons/text/StrMatcherTest.java |   4 +-
 .../apache/commons/text/StrSubstitutorTest.java |  46 +-
 .../apache/commons/text/StrTokenizerTest.java   | 171 ++++---
 .../commons/text/StringEscapeUtilsTest.java     | 145 +++---
 .../org/apache/commons/text/WordUtilsTest.java  | 210 ++++----
 .../text/diff/ReplacementsFinderTest.java       |   7 +-
 .../text/diff/StringsComparatorTest.java        |   6 +-
 .../text/similarity/CosineDistanceTest.java     |   4 +-
 .../text/similarity/CosineSimilarityTest.java   |   4 +-
 .../commons/text/similarity/FuzzyScoreTest.java |   6 +-
 .../text/similarity/HammingDistanceTest.java    |   8 +-
 .../text/similarity/JaccardDistanceTest.java    |   5 +-
 .../text/similarity/JaccardSimilarityTest.java  |   9 +-
 .../similarity/JaroWinklerDistanceTest.java     |  13 +-
 .../LevenshteinDetailedDistanceTest.java        |  35 +-
 .../similarity/LevenshteinDistanceTest.java     |   6 +-
 .../text/similarity/LevenshteinResultsTest.java |   8 +-
 .../LongestCommonSubsequenceDistanceTest.java   |   5 +-
 .../LongestCommonSubsequenceTest.java           |  15 +-
 .../ParameterizedEditDistanceFromTest.java      |  26 +-
 .../ParameterizedLevenshteinDistanceTest.java   |  91 ++--
 .../ParameterizedSimilarityScoreFromTest.java   |  10 +-
 .../similarity/SimilarityScoreFromTest.java     |   5 +-
 .../text/similarity/StringMetricFromTest.java   |   8 +-
 .../text/translate/AggregateTranslatorTest.java |   4 +-
 .../text/translate/CodePointTranslatorTest.java |   2 +-
 .../text/translate/EntityArraysTest.java        |  12 +-
 .../text/translate/JavaUnicodeEscaperTest.java  |   5 +-
 .../text/translate/LookupTranslatorTest.java    |   6 +-
 .../translate/NumericEntityEscaperTest.java     |   4 +-
 .../translate/NumericEntityUnescaperTest.java   |  16 +-
 .../text/translate/OctalUnescaperTest.java      |   4 +-
 .../translate/SinglePassTranslatorTest.java     |   2 +-
 .../text/translate/UnicodeEscaperTest.java      |   4 +-
 .../text/translate/UnicodeUnescaperTest.java    |   6 +-
 .../UnicodeUnpairedSurrogateRemoverTest.java    |   8 +-
 48 files changed, 954 insertions(+), 796 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-text/blob/6665a020/checkstyle-suppressions.xml
----------------------------------------------------------------------
diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml
index 687034d..6cffab5 100644
--- a/checkstyle-suppressions.xml
+++ b/checkstyle-suppressions.xml
@@ -54,4 +54,12 @@
   <suppress checks="MagicNumber" files="UnicodeUnescaper.java" lines="0-99999" />
 
   <suppress checks="MagicNumber" files="WordUtils.java" lines="0-99999" />
+  
+  <suppress checks="MagicNumber" files=".*[/\\]test[/\\].*" />
+  <suppress checks="MethodName" files=".*[/\\]test[/\\].*" />
+  <suppress checks="Javadoc" files=".*[/\\]test[/\\].*" />
+  <suppress checks="FileLength" files="StrBuilderTest.java" />
+  <suppress checks="MethodLength" files="LevenshteinDetailedDistanceTest.java" />
+  <suppress checks="MethodLength" files="StrBuilderAppendInsertTest.java" />
+  <suppress checks="TodoComment" files="StringEscapeUtilsTest.java" />
 </suppressions>

http://git-wip-us.apache.org/repos/asf/commons-text/blob/6665a020/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c0c40e7..dcee00d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -107,6 +107,7 @@
           <headerLocation>${basedir}/license-header.txt</headerLocation>
           <suppressionsLocation>${basedir}/checkstyle-suppressions.xml</suppressionsLocation>
           <suppressionsFileExpression>${basedir}/checkstyle-suppressions.xml</suppressionsFileExpression>
+          <includeTestSourceDirectory>true</includeTestSourceDirectory>
         </configuration>
         <dependencies>
           <dependency>
@@ -170,6 +171,7 @@
           <headerLocation>${basedir}/license-header.txt</headerLocation>
           <suppressionsLocation>${basedir}/checkstyle-suppressions.xml</suppressionsLocation>
           <suppressionsFileExpression>${basedir}/checkstyle-suppressions.xml</suppressionsFileExpression>
+          <includeTestSourceDirectory>true</includeTestSourceDirectory>
         </configuration>
         <reportSets>
           <reportSet>

http://git-wip-us.apache.org/repos/asf/commons-text/blob/6665a020/src/main/java/org/apache/commons/text/StrBuilder.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/text/StrBuilder.java b/src/main/java/org/apache/commons/text/StrBuilder.java
index 0d0a127..446b2b9 100644
--- a/src/main/java/org/apache/commons/text/StrBuilder.java
+++ b/src/main/java/org/apache/commons/text/StrBuilder.java
@@ -1283,7 +1283,7 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
      * This method is useful for adding a separator each time around the
      * loop except the first.
      * <pre>
-     * for (Iterator it = list.iterator(); it.hasNext(); ) {
+     * for (Iterator it = list.iterator(); it.hasNext();){
      *   appendSeparator(",");
      *   append(it.next());
      * }
@@ -1339,7 +1339,7 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
      * This method is useful for adding a separator each time around the
      * loop except the first.
      * <pre>
-     * for (Iterator it = list.iterator(); it.hasNext(); ) {
+     * for (Iterator it = list.iterator(); it.hasNext();){
      *   appendSeparator(',');
      *   append(it.next());
      * }

http://git-wip-us.apache.org/repos/asf/commons-text/blob/6665a020/src/test/java/org/apache/commons/text/AlphabetConverterTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/text/AlphabetConverterTest.java b/src/test/java/org/apache/commons/text/AlphabetConverterTest.java
index 2f4c8a1..0178a4a 100644
--- a/src/test/java/org/apache/commons/text/AlphabetConverterTest.java
+++ b/src/test/java/org/apache/commons/text/AlphabetConverterTest.java
@@ -36,21 +36,31 @@ import static org.junit.Assert.assertTrue;
  */
 public class AlphabetConverterTest {
 
-    private static Character[] lower_case_english = {' ','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
-    private static Character[] english_and_numbers = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',' ' };
-    private static Character[] lower_case_english_and_numbers = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',' ' };
-    private static Character[] numbers = {'0','1','2','3','4','5','6','7','8','9'};
-    private static Character[] binary = {'0','1'};
-    private static Character[] hebrew = {'_', ' ', '\u05e7','\u05e8','\u05d0','\u05d8','\u05d5','\u05df','\u05dd','\u05e4','\u05e9','\u05d3','\u05d2','\u05db','\u05e2','\u05d9','\u05d7','\u05dc','\u05da','\u05e3','\u05d6','\u05e1','\u05d1','\u05d4','\u05e0','\u05de','\u05e6','\u05ea','\u05e5'};
+    private static Character[] lowerCaseEnglish = {' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
+            'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
+    private static Character[] englishAndNumbers = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c',
+            'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x',
+            'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
+            'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' '};
+    private static Character[] lowerCaseEnglishAndNumbers = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a',
+            'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
+            'w', 'x', 'y', 'z', ' '};
+    private static Character[] numbers = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
+    private static Character[] binary = {'0', '1'};
+    private static Character[] hebrew = {'_', ' ', '\u05e7', '\u05e8', '\u05d0', '\u05d8', '\u05d5', '\u05df', '\u05dd',
+            '\u05e4', '\u05e9', '\u05d3', '\u05d2', '\u05db', '\u05e2', '\u05d9', '\u05d7', '\u05dc', '\u05da',
+            '\u05e3', '\u05d6', '\u05e1', '\u05d1', '\u05d4', '\u05e0', '\u05de', '\u05e6', '\u05ea', '\u05e5'};
     private static Character[] empty = {};
 
-    private static Integer[] unicode = {32,35395,35397,36302,36291,35203,35201,35215,35219,35268,97,98,99,100,101,102,103,104,105,106,107,108,109,110,1001,1002,1003,1004,1005};
-    private static Integer[] lower_case_english_codepoints = {32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122};
-    private static Integer[] doNotEncodePoints = {32,97,98,99}; // space, a, b, c
-    
+    private static Integer[] unicode = {32, 35395, 35397, 36302, 36291, 35203, 35201, 35215, 35219, 35268, 97, 98, 99,
+            100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 1001, 1002, 1003, 1004, 1005};
+    private static Integer[] lowerCaseEnglishCodepoints = {32, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
+            108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122};
+    private static Integer[] doNotEncodeCodepoints = {32, 97, 98, 99}; // space, a, b, c
+
     @Rule
     public ExpectedException thrown = ExpectedException.none();
-    
+
     @Test
     public void encodeFailureTest() throws UnsupportedEncodingException {
         thrown.expect(UnsupportedEncodingException.class);
@@ -62,38 +72,44 @@ public class AlphabetConverterTest {
     public void binaryTest() throws UnsupportedEncodingException {
         test(binary, numbers, empty, "0", "1", "10", "11");
         test(numbers, binary, empty, "12345", "0");
-        test(lower_case_english, binary, empty, "abc", "a");
+        test(lowerCaseEnglish, binary, empty, "abc", "a");
     }
 
     @Test
     public void hebrewTest() throws UnsupportedEncodingException {
-        test(hebrew, binary, empty, "\u05d0", "\u05e2", "\u05d0\u05dc\u05e3_\u05d0\u05d5\u05d4\u05d1\u05dc_\u05d1\u05d9\u05ea_\u05d6\u05d4_\u05d1\u05d9\u05ea_\u05d2\u05d9\u05de\u05dc_\u05d6\u05d4_\u05db\u05de\u05dc_\u05d2\u05d3\u05d5\u05dc");
-        test(hebrew, numbers, empty, "\u05d0", "\u05e2", "\u05d0\u05dc\u05e3_\u05d0\u05d5\u05d4\u05d1\u05dc_\u05d1\u05d9\u05ea_\u05d6\u05d4_\u05d1\u05d9\u05ea_\u05d2\u05d9\u05de\u05dc_\u05d6\u05d4_\u05db\u05de\u05dc_\u05d2\u05d3\u05d5\u05dc");
+        test(hebrew, binary, empty, "\u05d0", "\u05e2",
+                "\u05d0\u05dc\u05e3_\u05d0\u05d5\u05d4\u05d1\u05dc_\u05d1\u05d9\u05ea_\u05d6\u05d4_\u05d1\u05d9\u05ea_"
+                + "\u05d2\u05d9\u05de\u05dc_\u05d6\u05d4_\u05db\u05de\u05dc_\u05d2\u05d3\u05d5\u05dc");
+        test(hebrew, numbers, empty, "\u05d0", "\u05e2",
+                "\u05d0\u05dc\u05e3_\u05d0\u05d5\u05d4\u05d1\u05dc_\u05d1\u05d9\u05ea_\u05d6\u05d4_\u05d1\u05d9\u05ea_"
+                + "\u05d2\u05d9\u05de\u05dc_\u05d6\u05d4_\u05db\u05de\u05dc_\u05d2\u05d3\u05d5\u05dc");
         test(numbers, hebrew, empty, "123456789", "1", "5");
-        test(lower_case_english, hebrew, empty, "this is a test");
+        test(lowerCaseEnglish, hebrew, empty, "this is a test");
     }
 
     @Test
     public void doNotEncodeTest() throws UnsupportedEncodingException {
-        test(english_and_numbers, lower_case_english_and_numbers, lower_case_english, "1", "456", "abc", "ABC", "this will not be converted but THIS WILL");
-        test(english_and_numbers, lower_case_english_and_numbers, numbers, "1", "456", "abc", "ABC", "this will be converted but 12345 and this will be");
+        test(englishAndNumbers, lowerCaseEnglishAndNumbers, lowerCaseEnglish, "1", "456", "abc", "ABC",
+                "this will not be converted but THIS WILL");
+        test(englishAndNumbers, lowerCaseEnglishAndNumbers, numbers, "1", "456", "abc", "ABC",
+                "this will be converted but 12345 and this will be");
     }
 
     private AlphabetConverter createJavadocExample() {
-        final Character[] original = {'a','b','c','d'};
-        final Character[] encoding = {'0','1','d'};
+        final Character[] original = {'a', 'b', 'c', 'd'};
+        final Character[] encoding = {'0', '1', 'd'};
         final Character[] doNotEncode = {'d'};
-        
+
         return AlphabetConverter.createConverterFromChars(original, encoding, doNotEncode);
     }
-    
+
     /*
      * Test example in javadocs for consistency
      */
     @Test
     public void javadocExampleTest() throws UnsupportedEncodingException {
         final AlphabetConverter ac = createJavadocExample();
-        
+
         assertEquals("00", ac.encode("a"));
         assertEquals("01", ac.encode("b"));
         assertEquals("0d", ac.encode("c"));
@@ -104,7 +120,7 @@ public class AlphabetConverterTest {
     @Test
     public void unexpectedEndwhileDecodingTest() throws UnsupportedEncodingException {
         final String toDecode = "00d01d0";
-        
+
         thrown.expect(UnsupportedEncodingException.class);
         thrown.expectMessage("Unexpected end of string while decoding " + toDecode);
 
@@ -115,7 +131,7 @@ public class AlphabetConverterTest {
     @Test
     public void unexpectedStringWhileDecodingTest() throws UnsupportedEncodingException {
         final String toDecode = "00XX";
-        
+
         thrown.expect(UnsupportedEncodingException.class);
         thrown.expectMessage("Unexpected string without decoding (XX) in " + toDecode);
 
@@ -128,34 +144,38 @@ public class AlphabetConverterTest {
      */
     @Test
     public void unicodeTest() throws UnsupportedEncodingException {
-        final AlphabetConverter ac = AlphabetConverter.createConverter(unicode, lower_case_english_codepoints, doNotEncodePoints);
-        
+        final AlphabetConverter ac = AlphabetConverter.createConverter(unicode, lowerCaseEnglishCodepoints,
+                doNotEncodeCodepoints);
+
         assertEquals(2, ac.getEncodedCharLength());
-        
+
         final String original = "\u8a43\u8a45 \u8dce ab \u8dc3 c \u8983";
         final String encoded = ac.encode(original);
         final String decoded = ac.decode(encoded);
-        
-        assertEquals("Encoded '" + original + "' into '" + encoded + "', but decoded into '" + decoded + "'", original, decoded);
+
+        assertEquals("Encoded '" + original + "' into '" + encoded + "', but decoded into '" + decoded + "'", original,
+                decoded);
     }
 
     @Test
     public void noEncodingLettersTest() {
         thrown.expect(IllegalArgumentException.class);
-        thrown.expectMessage("Must have at least two encoding characters (excluding those in the 'do not encode' list), but has 0");
+        thrown.expectMessage(
+                "Must have at least two encoding characters (excluding those in the 'do not encode' list), but has 0");
 
-        AlphabetConverter.createConverterFromChars(english_and_numbers, numbers, numbers);
+        AlphabetConverter.createConverterFromChars(englishAndNumbers, numbers, numbers);
     }
 
     @Test
     public void onlyOneEncodingLettersTest() {
         thrown.expect(IllegalArgumentException.class);
-        thrown.expectMessage("Must have at least two encoding characters (excluding those in the 'do not encode' list), but has 1");
+        thrown.expectMessage(
+                "Must have at least two encoding characters (excluding those in the 'do not encode' list), but has 1");
 
         final Character[] numbersPlusUnderscore = Arrays.copyOf(numbers, numbers.length + 1);
-        numbersPlusUnderscore[numbersPlusUnderscore.length -1] = '_';
+        numbersPlusUnderscore[numbersPlusUnderscore.length - 1] = '_';
 
-        AlphabetConverter.createConverterFromChars(english_and_numbers, numbersPlusUnderscore, numbers);
+        AlphabetConverter.createConverterFromChars(englishAndNumbers, numbersPlusUnderscore, numbers);
     }
 
     @Test
@@ -163,7 +183,7 @@ public class AlphabetConverterTest {
         thrown.expect(IllegalArgumentException.class);
         thrown.expectMessage("Can not use 'do not encode' list because encoding alphabet does not contain");
 
-        AlphabetConverter.createConverterFromChars(english_and_numbers, lower_case_english, numbers);
+        AlphabetConverter.createConverterFromChars(englishAndNumbers, lowerCaseEnglish, numbers);
     }
 
     @Test
@@ -171,15 +191,18 @@ public class AlphabetConverterTest {
         thrown.expect(IllegalArgumentException.class);
         thrown.expectMessage("Can not use 'do not encode' list because original alphabet does not contain");
 
-        AlphabetConverter.createConverterFromChars(lower_case_english, english_and_numbers, numbers);
+        AlphabetConverter.createConverterFromChars(lowerCaseEnglish, englishAndNumbers, numbers);
     }
 
-    private void test(final Character[] originalChars, final Character[] encodingChars, final Character[] doNotEncodeChars, final String... strings) throws UnsupportedEncodingException {
-        
-        final AlphabetConverter ac = AlphabetConverter.createConverterFromChars(originalChars, encodingChars, doNotEncodeChars);
-        
-        final AlphabetConverter reconstructedAlphabetConverter = AlphabetConverter.createConverterFromMap(ac.getOriginalToEncoded());
-        
+    private void test(final Character[] originalChars, final Character[] encodingChars,
+            final Character[] doNotEncodeChars, final String... strings) throws UnsupportedEncodingException {
+
+        final AlphabetConverter ac = AlphabetConverter.createConverterFromChars(originalChars, encodingChars,
+                doNotEncodeChars);
+
+        final AlphabetConverter reconstructedAlphabetConverter = AlphabetConverter
+                .createConverterFromMap(ac.getOriginalToEncoded());
+
         assertEquals(ac, reconstructedAlphabetConverter);
         assertEquals(ac.hashCode(), reconstructedAlphabetConverter.hashCode());
         assertEquals(ac.toString(), reconstructedAlphabetConverter.toString());
@@ -203,12 +226,12 @@ public class AlphabetConverterTest {
             for (int i = 0; i < decoded.length(); i++) {
                 assertTrue(originalCharsList.contains(decoded.charAt(i)));
             }
-            
+
             assertEquals("Encoded '" + s + "' into '" + encoded + "', but decoded into '" + decoded + "'", s, decoded);
         }
     }
 
-    @Test(expected=IllegalArgumentException.class)
+    @Test(expected = IllegalArgumentException.class)
     public void testCreateConverterFromCharsWithNullAndNull() {
         final Character[] characterArray = new Character[2];
         characterArray[0] = Character.valueOf('$');
@@ -222,7 +245,8 @@ public class AlphabetConverterTest {
         final Character[] characterArray = new Character[2];
         characterArray[0] = new Character('5');
         characterArray[1] = characterArray[0];
-        final AlphabetConverter alphabetConverter = AlphabetConverter.createConverterFromChars(characterArray, characterArray, characterArray);
+        final AlphabetConverter alphabetConverter = AlphabetConverter.createConverterFromChars(characterArray,
+                characterArray, characterArray);
 
         assertEquals(1, alphabetConverter.getEncodedCharLength());
     }
@@ -244,7 +268,8 @@ public class AlphabetConverterTest {
         final Character character = new Character('R');
         characterArray[0] = character;
         characterArray[1] = character;
-        final AlphabetConverter alphabetConverter = AlphabetConverter.createConverterFromChars(characterArray, characterArray, characterArray);
+        final AlphabetConverter alphabetConverter = AlphabetConverter.createConverterFromChars(characterArray,
+                characterArray, characterArray);
         final Map<Integer, String> map = new HashMap<>();
         final AlphabetConverter alphabetConverterTwo = AlphabetConverter.createConverterFromMap(map);
 
@@ -258,7 +283,8 @@ public class AlphabetConverterTest {
         final Character character = new Character('R');
         characterArray[0] = character;
         characterArray[1] = character;
-        final AlphabetConverter alphabetConverter = AlphabetConverter.createConverterFromChars(characterArray, characterArray, characterArray);
+        final AlphabetConverter alphabetConverter = AlphabetConverter.createConverterFromChars(characterArray,
+                characterArray, characterArray);
 
         assertTrue(alphabetConverter.equals(alphabetConverter));
     }
@@ -266,7 +292,8 @@ public class AlphabetConverterTest {
     @Test
     public void testEqualsWithNull() {
         final Character[] characterArray = new Character[0];
-        final AlphabetConverter alphabetConverter = AlphabetConverter.createConverterFromChars(characterArray, null, null);
+        final AlphabetConverter alphabetConverter = AlphabetConverter.createConverterFromChars(characterArray, null,
+                null);
 
         assertFalse(alphabetConverter.equals(null));
     }
@@ -278,7 +305,8 @@ public class AlphabetConverterTest {
         final Character character = new Character('+');
         characterArray[0] = character;
         characterArray[1] = characterArray[0];
-        final AlphabetConverter alphabetConverter = AlphabetConverter.createConverterFromChars(characterArray, characterArray, characterArray);
+        final AlphabetConverter alphabetConverter = AlphabetConverter.createConverterFromChars(characterArray,
+                characterArray, characterArray);
 
         assertFalse(alphabetConverter.equals(charOne));
     }

http://git-wip-us.apache.org/repos/asf/commons-text/blob/6665a020/src/test/java/org/apache/commons/text/CaseUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/text/CaseUtilsTest.java b/src/test/java/org/apache/commons/text/CaseUtilsTest.java
index e012eb1..3211b18 100644
--- a/src/test/java/org/apache/commons/text/CaseUtilsTest.java
+++ b/src/test/java/org/apache/commons/text/CaseUtilsTest.java
@@ -46,7 +46,7 @@ public class CaseUtilsTest {
     //------------------------------------------------------------------------
     @Test
     public void testToCamelCase() throws Exception {
-        assertNull(CaseUtils.toCamelCase(null, false,null));
+        assertNull(CaseUtils.toCamelCase(null, false, null));
         assertEquals("", CaseUtils.toCamelCase("", true, null));
         assertEquals("  ", CaseUtils.toCamelCase("  ", false, null));
         assertEquals("aBC@def", CaseUtils.toCamelCase("a  b  c  @def", false, null));
@@ -54,7 +54,7 @@ public class CaseUtilsTest {
         assertEquals("ABC@def", CaseUtils.toCamelCase("a b c @def", true, new char[]{'-'}));
         assertEquals("ABC@def", CaseUtils.toCamelCase("a b c @def", true, new char[]{'-'}));
 
-        final char[] chars = new char[] { '-', '+', ' ', '@' };
+        final char[] chars = {'-', '+', ' ', '@'};
         assertEquals("-+@ ", CaseUtils.toCamelCase("-+@ ", true, chars));
         assertEquals("toCamelCase", CaseUtils.toCamelCase("   to-CAMEL-cASE", false, chars));
         assertEquals("ToCamelCase", CaseUtils.toCamelCase("@@@@   to+CAMEL@cASE ", true, chars));
@@ -76,6 +76,8 @@ public class CaseUtilsTest {
         assertEquals("tocamelcase", CaseUtils.toCamelCase("tocamelcase", false));
 
         assertEquals("\uD800\uDF00\uD800\uDF02", CaseUtils.toCamelCase("\uD800\uDF00 \uD800\uDF02", true));
-        assertEquals("\uD800\uDF00\uD800\uDF01\uD800\uDF02\uD800\uDF03", CaseUtils.toCamelCase("\uD800\uDF00\uD800\uDF01\uD800\uDF14\uD800\uDF02\uD800\uDF03", true, new char[]{'\uD800', '\uDF14'}));
+        assertEquals("\uD800\uDF00\uD800\uDF01\uD800\uDF02\uD800\uDF03",
+                CaseUtils.toCamelCase("\uD800\uDF00\uD800\uDF01\uD800\uDF14\uD800\uDF02\uD800\uDF03", true,
+                        new char[]{'\uD800', '\uDF14'}));
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/commons-text/blob/6665a020/src/test/java/org/apache/commons/text/CharacterPredicatesTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/text/CharacterPredicatesTest.java b/src/test/java/org/apache/commons/text/CharacterPredicatesTest.java
index 1100868..63f606b 100644
--- a/src/test/java/org/apache/commons/text/CharacterPredicatesTest.java
+++ b/src/test/java/org/apache/commons/text/CharacterPredicatesTest.java
@@ -16,9 +16,10 @@
  */
 package org.apache.commons.text;
 
-import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
-import static org.junit.Assert.*;
+import org.junit.Test;
 
 /**
  * Tests for {@link CharacterPredicates}.
@@ -110,4 +111,4 @@ public class CharacterPredicatesTest {
         assertFalse(CharacterPredicates.ASCII_ALPHA_NUMERALS.test('/'));
         assertFalse(CharacterPredicates.ASCII_ALPHA_NUMERALS.test(':'));
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/commons-text/blob/6665a020/src/test/java/org/apache/commons/text/CompositeFormatTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/text/CompositeFormatTest.java b/src/test/java/org/apache/commons/text/CompositeFormatTest.java
index 5965fa3..0130f9b 100644
--- a/src/test/java/org/apache/commons/text/CompositeFormatTest.java
+++ b/src/test/java/org/apache/commons/text/CompositeFormatTest.java
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,21 +17,23 @@
 
 package org.apache.commons.text;
 
-import org.junit.Test;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+
 import java.text.FieldPosition;
 import java.text.Format;
 import java.text.ParsePosition;
 import java.text.SimpleDateFormat;
 import java.util.Locale;
 
+import org.junit.Test;
+
 /**
  * Unit tests for {@link CompositeFormat}.
  */
 public class CompositeFormatTest {
 
     /**
-     * Ensures that the parse/format separation is correctly maintained. 
+     * Ensures that the parse/format separation is correctly maintained.
      */
     @Test
     public void testCompositeFormat() {
@@ -68,8 +70,8 @@ public class CompositeFormatTest {
 
         composite.parseObject("", null);
         composite.format(new Object(), new StringBuffer(), null);
-        assertEquals( "Parser get method incorrectly implemented", parser, composite.getParser() );
-        assertEquals( "Formatter get method incorrectly implemented", formatter, composite.getFormatter() );
+        assertEquals("Parser get method incorrectly implemented", parser, composite.getParser());
+        assertEquals("Formatter get method incorrectly implemented", formatter, composite.getFormatter());
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/commons-text/blob/6665a020/src/test/java/org/apache/commons/text/ExtendedMessageFormatTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/text/ExtendedMessageFormatTest.java b/src/test/java/org/apache/commons/text/ExtendedMessageFormatTest.java
index 77e7502..640b5b0 100644
--- a/src/test/java/org/apache/commons/text/ExtendedMessageFormatTest.java
+++ b/src/test/java/org/apache/commons/text/ExtendedMessageFormatTest.java
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,9 +16,9 @@
  */
 package org.apache.commons.text;
 
-import org.junit.Test;
-import org.junit.Before;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 import java.text.DateFormat;
 import java.text.FieldPosition;
@@ -34,6 +34,9 @@ import java.util.HashSet;
 import java.util.Locale;
 import java.util.Map;
 
+import org.junit.Before;
+import org.junit.Test;
+
 /**
  * Test case for {@link ExtendedMessageFormat}.
  */
@@ -247,7 +250,8 @@ public class ExtendedMessageFormatTest {
         cal.set(2007, Calendar.JANUARY, 23);
         final Object[] args = new Object[] {cal.getTime()};
         final Locale[] availableLocales = DateFormat.getAvailableLocales();
-        final Map<String, ? extends FormatFactory> dateRegistry = Collections.singletonMap("date", new OverrideShortDateFormatFactory());
+        final Map<String, ? extends FormatFactory> dateRegistry =
+                Collections.singletonMap("date", new OverrideShortDateFormatFactory());
 
         //check the non-overridden builtins:
         checkBuiltInFormat("1: {0,date}", dateRegistry,          args, availableLocales);
@@ -286,8 +290,10 @@ public class ExtendedMessageFormatTest {
      */
     @Test
     public void testEqualsHashcode() {
-        final Map<String, ? extends FormatFactory> fmtRegistry = Collections.singletonMap("testfmt", new LowerCaseFormatFactory());
-        final Map<String, ? extends FormatFactory> otherRegitry = Collections.singletonMap("testfmt", new UpperCaseFormatFactory());
+        final Map<String, ? extends FormatFactory> fmtRegistry =
+                Collections.singletonMap("testfmt", new LowerCaseFormatFactory());
+        final Map<String, ? extends FormatFactory> otherRegitry =
+                Collections.singletonMap("testfmt", new UpperCaseFormatFactory());
 
         final String pattern = "Pattern: {0,testfmt}";
         final ExtendedMessageFormat emf = new ExtendedMessageFormat(pattern, Locale.US, fmtRegistry);
@@ -343,7 +349,8 @@ public class ExtendedMessageFormatTest {
      * @param args MessageFormat arguments
      * @param locales to test
      */
-    private void checkBuiltInFormat(final String pattern, final Map<String, ?> fmtRegistry, final Object[] args, final Locale[] locales) {
+    private void checkBuiltInFormat(final String pattern, final Map<String, ?> fmtRegistry, final Object[] args,
+            final Locale[] locales) {
         checkBuiltInFormat(pattern, fmtRegistry, args, (Locale) null);
         for (final Locale locale : locales) {
             checkBuiltInFormat(pattern, fmtRegistry, args, locale);
@@ -358,7 +365,8 @@ public class ExtendedMessageFormatTest {
      * @param args Object[]
      * @param locale Locale
      */
-    private void checkBuiltInFormat(final String pattern, final Map<String, ?> registryUnused, final Object[] args, final Locale locale) {
+    private void checkBuiltInFormat(final String pattern, final Map<String, ?> registryUnused, final Object[] args,
+            final Locale locale) {
         final StringBuilder buffer = new StringBuilder();
         buffer.append("Pattern=[");
         buffer.append(pattern);
@@ -443,9 +451,11 @@ public class ExtendedMessageFormatTest {
 
     @Test
     public void testCreatesExtendedMessageFormatTakingString() {
-        final ExtendedMessageFormat extendedMessageFormat = new ExtendedMessageFormat("Unterminated format element at position ");
+        final ExtendedMessageFormat extendedMessageFormat =
+                new ExtendedMessageFormat("Unterminated format element at position ");
         final Map<String, FormatFactory> map = new HashMap<>();
-        final ExtendedMessageFormat extendedMessageFormatTwo = new ExtendedMessageFormat("Unterminated format element at position ", map);
+        final ExtendedMessageFormat extendedMessageFormatTwo =
+                new ExtendedMessageFormat("Unterminated format element at position ", map);
 
         assertEquals("Unterminated format element at position ", extendedMessageFormatTwo.toPattern());
         assertFalse(extendedMessageFormat.equals(extendedMessageFormatTwo));
@@ -461,10 +471,13 @@ public class ExtendedMessageFormatTest {
 
         @Override
         public StringBuffer format(final Object obj, final StringBuffer toAppendTo, final FieldPosition pos) {
-            return toAppendTo.append(((String)obj).toLowerCase(Locale.ROOT));
+            return toAppendTo.append(((String) obj).toLowerCase(Locale.ROOT));
         }
+
         @Override
-        public Object parseObject(final String source, final ParsePosition pos) {throw new UnsupportedOperationException();}
+        public Object parseObject(final String source, final ParsePosition pos) {
+            throw new UnsupportedOperationException();
+        }
     }
 
     /**
@@ -475,10 +488,13 @@ public class ExtendedMessageFormatTest {
 
         @Override
         public StringBuffer format(final Object obj, final StringBuffer toAppendTo, final FieldPosition pos) {
-            return toAppendTo.append(((String)obj).toUpperCase(Locale.ROOT));
+            return toAppendTo.append(((String) obj).toUpperCase(Locale.ROOT));
         }
+
         @Override
-        public Object parseObject(final String source, final ParsePosition pos) {throw new UnsupportedOperationException();}
+        public Object parseObject(final String source, final ParsePosition pos) {
+            throw new UnsupportedOperationException();
+        }
     }
 
 
@@ -522,11 +538,10 @@ public class ExtendedMessageFormatTest {
     private static class OtherExtendedMessageFormat extends ExtendedMessageFormat {
         private static final long serialVersionUID = 1L;
 
-        public OtherExtendedMessageFormat(final String pattern, final Locale locale,
+        OtherExtendedMessageFormat(final String pattern, final Locale locale,
                 final Map<String, ? extends FormatFactory> registry) {
             super(pattern, locale, registry);
         }
-
     }
 
 }

http://git-wip-us.apache.org/repos/asf/commons-text/blob/6665a020/src/test/java/org/apache/commons/text/FormattableUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/text/FormattableUtilsTest.java b/src/test/java/org/apache/commons/text/FormattableUtilsTest.java
index b937b84..6038f62 100644
--- a/src/test/java/org/apache/commons/text/FormattableUtilsTest.java
+++ b/src/test/java/org/apache/commons/text/FormattableUtilsTest.java
@@ -57,7 +57,7 @@ public class FormattableUtilsTest {
 
     @Test
     public void testAlternatePadCharacter() {
-        final char pad='_';
+        final char pad = '_';
         assertEquals("foo", FormattableUtils.append("foo", new Formatter(), 0, -1, -1, pad).toString());
         assertEquals("fo", FormattableUtils.append("foo", new Formatter(), 0, -1, 2, pad).toString());
         assertEquals("_foo", FormattableUtils.append("foo", new Formatter(), 0, 4, -1, pad).toString());
@@ -95,7 +95,7 @@ public class FormattableUtilsTest {
         assertEquals("+*   ", FormattableUtils.append("foo", new Formatter(), LEFT_JUSTIFY, 5, 2, "+*").toString());
     }
 
-    @Test(expected=IllegalArgumentException.class)
+    @Test(expected = IllegalArgumentException.class)
     public void testIllegalEllipsis() {
         FormattableUtils.append("foo", new Formatter(), 0, -1, 1, "xx");
     }
@@ -108,10 +108,14 @@ public class FormattableUtilsTest {
         assertEquals("___foo", FormattableUtils.append("foo", new Formatter(), 0, 6, -1, '_', "*").toString());
         assertEquals("_f*", FormattableUtils.append("foo", new Formatter(), 0, 3, 2, '_', "*").toString());
         assertEquals("___f*", FormattableUtils.append("foo", new Formatter(), 0, 5, 2, '_', "*").toString());
-        assertEquals("foo_", FormattableUtils.append("foo", new Formatter(), LEFT_JUSTIFY, 4, -1, '_', "*").toString());
-        assertEquals("foo___", FormattableUtils.append("foo", new Formatter(), LEFT_JUSTIFY, 6, -1, '_', "*").toString());
-        assertEquals("f*_", FormattableUtils.append("foo", new Formatter(), LEFT_JUSTIFY, 3, 2, '_', "*").toString());
-        assertEquals("f*___", FormattableUtils.append("foo", new Formatter(), LEFT_JUSTIFY, 5, 2, '_', "*").toString());
+        assertEquals("foo_",
+                FormattableUtils.append("foo", new Formatter(), LEFT_JUSTIFY, 4, -1, '_', "*").toString());
+        assertEquals("foo___",
+                FormattableUtils.append("foo", new Formatter(), LEFT_JUSTIFY, 6, -1, '_', "*").toString());
+        assertEquals("f*_",
+                FormattableUtils.append("foo", new Formatter(), LEFT_JUSTIFY, 3, 2, '_', "*").toString());
+        assertEquals("f*___",
+                FormattableUtils.append("foo", new Formatter(), LEFT_JUSTIFY, 5, 2, '_', "*").toString());
 
         assertEquals("foo", FormattableUtils.append("foo", new Formatter(), 0, -1, -1, '_', "+*").toString());
         assertEquals("+*", FormattableUtils.append("foo", new Formatter(), 0, -1, 2, '_', "+*").toString());
@@ -119,10 +123,14 @@ public class FormattableUtilsTest {
         assertEquals("___foo", FormattableUtils.append("foo", new Formatter(), 0, 6, -1, '_', "+*").toString());
         assertEquals("_+*", FormattableUtils.append("foo", new Formatter(), 0, 3, 2, '_', "+*").toString());
         assertEquals("___+*", FormattableUtils.append("foo", new Formatter(), 0, 5, 2, '_', "+*").toString());
-        assertEquals("foo_", FormattableUtils.append("foo", new Formatter(), LEFT_JUSTIFY, 4, -1, '_', "+*").toString());
-        assertEquals("foo___", FormattableUtils.append("foo", new Formatter(), LEFT_JUSTIFY, 6, -1, '_', "+*").toString());
-        assertEquals("+*_", FormattableUtils.append("foo", new Formatter(), LEFT_JUSTIFY, 3, 2, '_', "+*").toString());
-        assertEquals("+*___", FormattableUtils.append("foo", new Formatter(), LEFT_JUSTIFY, 5, 2, '_', "+*").toString());
+        assertEquals("foo_",
+                FormattableUtils.append("foo", new Formatter(), LEFT_JUSTIFY, 4, -1, '_', "+*").toString());
+        assertEquals("foo___",
+                FormattableUtils.append("foo", new Formatter(), LEFT_JUSTIFY, 6, -1, '_', "+*").toString());
+        assertEquals("+*_",
+                FormattableUtils.append("foo", new Formatter(), LEFT_JUSTIFY, 3, 2, '_', "+*").toString());
+        assertEquals("+*___",
+                FormattableUtils.append("foo", new Formatter(), LEFT_JUSTIFY, 5, 2, '_', "+*").toString());
     }
 
     @Test(expected = NullPointerException.class)
@@ -143,4 +151,4 @@ public class FormattableUtilsTest {
         }
     }
 
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/commons-text/blob/6665a020/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java b/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java
index ea320cd..8b7a172 100644
--- a/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java
+++ b/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java
@@ -16,13 +16,16 @@
  */
 package org.apache.commons.text;
 
-import org.junit.Test;
-
 import static org.hamcrest.Matchers.allOf;
 import static org.hamcrest.Matchers.greaterThanOrEqualTo;
 import static org.hamcrest.Matchers.lessThanOrEqualTo;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
-import static org.junit.Assert.*;
+import org.junit.Test;
 
 /**
  * Tests for {@link RandomStringGenerator}
@@ -97,7 +100,8 @@ public class RandomStringGeneratorTest {
         final int length = 5000;
         final int minimumCodePoint = 'a';
         final int maximumCodePoint = 'z';
-        final RandomStringGenerator generator = new RandomStringGenerator.Builder().withinRange(minimumCodePoint,maximumCodePoint).build();
+        final RandomStringGenerator generator = new RandomStringGenerator.Builder()
+                .withinRange(minimumCodePoint, maximumCodePoint).build();
         final String str = generator.generate(length);
 
         int i = 0;
@@ -111,18 +115,19 @@ public class RandomStringGeneratorTest {
     @Test
     public void testWithinMultipleRanges() {
         final int length = 5000;
-        final char [][] pairs = {{'a','z'},{'0','9'}};
-        final RandomStringGenerator generator = new RandomStringGenerator.Builder().withinRange(pairs).build();
+        final char[][] pairs = {{'a', 'z'}, {'0', '9'}};
+        final RandomStringGenerator generator = new RandomStringGenerator.Builder()
+                .withinRange(pairs).build();
         final String str = generator.generate(length);
 
         int minimumCodePoint = 0, maximumCodePoint = 0;
 
-        for (final char [] pair : pairs ) {
+        for (final char[] pair : pairs) {
             minimumCodePoint = Math.min(minimumCodePoint, pair[0]);
             maximumCodePoint = Math.max(maximumCodePoint, pair[1]);
         }
 
-        for (final char [] pair : pairs ) {
+        for (final char[] pair : pairs) {
             int i = 0;
             do {
                 final int codePoint = str.codePointAt(i);
@@ -132,8 +137,6 @@ public class RandomStringGeneratorTest {
         }
     }
 
-
-
     @Test
     public void testNoLoneSurrogates() {
         final int length = 5000;
@@ -179,7 +182,7 @@ public class RandomStringGeneratorTest {
 
     @Test
     public void testMultipleFilters() {
-        final String str = new RandomStringGenerator.Builder().withinRange('a','d')
+        final String str = new RandomStringGenerator.Builder().withinRange('a', 'd')
                 .filteredBy(A_FILTER, B_FILTER).build().generate(5000);
 
         boolean aFound = false;
@@ -204,7 +207,7 @@ public class RandomStringGeneratorTest {
 
         // Request a string in an area of the Basic Multilingual Plane that is
         // largely occupied by private characters
-        final String str = new RandomStringGenerator.Builder().withinRange(startOfPrivateBMPChars, 
+        final String str = new RandomStringGenerator.Builder().withinRange(startOfPrivateBMPChars,
                 Character.MIN_SUPPLEMENTARY_CODE_POINT - 1).build().generate(5000);
 
         int i = 0;
@@ -270,15 +273,15 @@ public class RandomStringGeneratorTest {
 
     @Test
     public void testSelectFromCharVarargs() {
-        final String str="abc";
-        final RandomStringGenerator generator = new RandomStringGenerator.Builder().selectFrom('a','b','c').build();
+        final String str = "abc";
+        final RandomStringGenerator generator = new RandomStringGenerator.Builder().selectFrom('a', 'b', 'c').build();
         final String randomText = generator.generate(5);
         for (final char c : randomText.toCharArray()) {
             assertTrue(str.indexOf(c) != -1);
         }
     }
 
-    @Test(expected=NullPointerException.class)
+    @Test(expected = NullPointerException.class)
     public void testGenerateTakingIntThrowsNullPointerException() {
         final RandomStringGenerator.Builder randomStringGeneratorBuilder = new RandomStringGenerator.Builder();
         final CharacterPredicate[] characterPredicateArray = new CharacterPredicate[2];

http://git-wip-us.apache.org/repos/asf/commons-text/blob/6665a020/src/test/java/org/apache/commons/text/StrBuilderAppendInsertTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/text/StrBuilderAppendInsertTest.java b/src/test/java/org/apache/commons/text/StrBuilderAppendInsertTest.java
index 95a4adf..cfbfed6 100644
--- a/src/test/java/org/apache/commons/text/StrBuilderAppendInsertTest.java
+++ b/src/test/java/org/apache/commons/text/StrBuilderAppendInsertTest.java
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,8 +17,8 @@
 
 package org.apache.commons.text;
 
-import org.junit.Test;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
 
 import java.text.DecimalFormatSymbols;
 import java.util.Arrays;
@@ -26,6 +26,8 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.Iterator;
 
+import org.junit.Test;
+
 /**
  * Unit tests for {@link StrBuilder}.
  */
@@ -48,7 +50,7 @@ public class StrBuilderAppendInsertTest {
         StrBuilder sb = new StrBuilder("---");
         sb.appendNewLine().append("+++");
         assertEquals("---" + SEP + "+++", sb.toString());
-        
+
         sb = new StrBuilder("---");
         sb.setNewLineText("#").appendNewLine().setNewLineText(null).appendNewLine();
         assertEquals("---#" + SEP, sb.toString());
@@ -114,7 +116,7 @@ public class StrBuilderAppendInsertTest {
         sb.append(new StringBuilder("bld")); // Check it supports StringBuilder
         assertEquals("foobazyesSeqbld", sb.toString());
     }
-    
+
     //-----------------------------------------------------------------------
     @Test
     public void testAppend_StringBuilder() {
@@ -210,10 +212,10 @@ public class StrBuilderAppendInsertTest {
         sb.append("abcbardef", 3, 3);
         assertEquals("foobar", sb.toString());
 
-        sb.append( (CharSequence)"abcbardef", 4, 3);
+        sb.append((CharSequence) "abcbardef", 4, 3);
         assertEquals("foobarard", sb.toString());
     }
-    
+
     //-----------------------------------------------------------------------
     @Test
     public void testAppend_StringBuilder_int_int() {
@@ -273,7 +275,7 @@ public class StrBuilderAppendInsertTest {
         sb.append(new StringBuilder("abcbardef"), 3, 3);
         assertEquals("foobar", sb.toString());
 
-        sb.append( new StringBuilder("abcbardef"), 4, 3);
+        sb.append(new StringBuilder("abcbardef"), 4, 3);
         assertEquals("foobarard", sb.toString());
     }
 
@@ -823,7 +825,7 @@ public class StrBuilderAppendInsertTest {
         final StrBuilder sb = new StrBuilder();
         sb.appendln(true);
         assertEquals("true" + SEP, sb.toString());
-        
+
         sb.clear();
         sb.appendln(false);
         assertEquals("false" + SEP, sb.toString());
@@ -835,15 +837,15 @@ public class StrBuilderAppendInsertTest {
         final StrBuilder sb = new StrBuilder();
         sb.appendln(0);
         assertEquals("0" + SEP, sb.toString());
-        
+
         sb.clear();
         sb.appendln(1L);
         assertEquals("1" + SEP, sb.toString());
-        
+
         sb.clear();
         sb.appendln(2.3f);
         assertEquals("2.3" + SEP, sb.toString());
-        
+
         sb.clear();
         sb.appendln(4.5d);
         assertEquals("4.5" + SEP, sb.toString());
@@ -1198,7 +1200,7 @@ public class StrBuilderAppendInsertTest {
         sb.appendSeparator(",");
         assertEquals("foo,", sb.toString());
     }
-    
+
     //-----------------------------------------------------------------------
     @Test
     public void testAppendSeparator_String_String() {
@@ -1210,11 +1212,11 @@ public class StrBuilderAppendInsertTest {
         assertEquals("", sb.toString());
         sb.appendSeparator(standardSeparator, null);
         assertEquals("", sb.toString());
-        sb.appendSeparator(standardSeparator, startSeparator); 
+        sb.appendSeparator(standardSeparator, startSeparator);
         assertEquals(startSeparator, sb.toString());
-        sb.appendSeparator(null, null); 
+        sb.appendSeparator(null, null);
         assertEquals(startSeparator, sb.toString());
-        sb.appendSeparator(null, startSeparator); 
+        sb.appendSeparator(null, startSeparator);
         assertEquals(startSeparator, sb.toString());
         sb.append(foo);
         assertEquals(startSeparator + foo, sb.toString());
@@ -1257,7 +1259,7 @@ public class StrBuilderAppendInsertTest {
         assertEquals("foo", sb.toString());
         sb.appendSeparator(",", 1);
         assertEquals("foo,", sb.toString());
-        
+
         sb.appendSeparator(",", -1);  // no effect
         assertEquals("foo,", sb.toString());
     }
@@ -1272,7 +1274,7 @@ public class StrBuilderAppendInsertTest {
         assertEquals("foo", sb.toString());
         sb.appendSeparator(',', 1);
         assertEquals("foo,", sb.toString());
-        
+
         sb.appendSeparator(',', -1);  // no effect
         assertEquals("foo,", sb.toString());
     }


Mime
View raw message