@@ -106,14 +106,14 @@ private void test(final Character[] originalChars, final Character[] encodingCha
106106 }
107107
108108 @ Test
109- public void testBinaryTest () throws UnsupportedEncodingException {
109+ void testBinaryTest () throws UnsupportedEncodingException {
110110 test (BINARY , NUMBERS , ArrayUtils .EMPTY_CHARACTER_OBJECT_ARRAY , "0" , "1" , "10" , "11" );
111111 test (NUMBERS , BINARY , ArrayUtils .EMPTY_CHARACTER_OBJECT_ARRAY , "12345" , "0" );
112112 test (LOWER_CASE_ENGLISH , BINARY , ArrayUtils .EMPTY_CHARACTER_OBJECT_ARRAY , "abc" , "a" );
113113 }
114114
115115 @ Test
116- public void testCreateConverterFromCharsAndEquals () {
116+ void testCreateConverterFromCharsAndEquals () {
117117 final Character [] characterArray = new Character [2 ];
118118 final char charOne = '+' ;
119119 final char character = '+' ;
@@ -125,7 +125,7 @@ public void testCreateConverterFromCharsAndEquals() {
125125 }
126126
127127 @ Test
128- public void testCreateConverterFromCharsOne () {
128+ void testCreateConverterFromCharsOne () {
129129 final Character [] characterArray = new Character [2 ];
130130 characterArray [0 ] = '5' ;
131131 characterArray [1 ] = characterArray [0 ];
@@ -135,7 +135,7 @@ public void testCreateConverterFromCharsOne() {
135135 }
136136
137137 @ Test
138- public void testCreateConverterFromCharsWithNullAndNull () {
138+ void testCreateConverterFromCharsWithNullAndNull () {
139139 assertThrows (IllegalArgumentException .class , () -> {
140140 final Character [] characterArray = new Character [2 ];
141141 characterArray [0 ] = '$' ;
@@ -145,7 +145,7 @@ public void testCreateConverterFromCharsWithNullAndNull() {
145145 }
146146
147147 @ Test
148- public void testCreateConverterFromMapAndEquals () {
148+ void testCreateConverterFromMapAndEquals () {
149149 final Map <Integer , String > hashMap = new HashMap <>();
150150 final AlphabetConverter alphabetConverter = AlphabetConverter .createConverterFromMap (hashMap );
151151 hashMap .put (0 , "CtDs" );
@@ -155,27 +155,27 @@ public void testCreateConverterFromMapAndEquals() {
155155 }
156156
157157 @ Test
158- public void testDecodeReturningNull () throws UnsupportedEncodingException {
158+ void testDecodeReturningNull () throws UnsupportedEncodingException {
159159 final Map <Integer , String > map = new HashMap <>();
160160 final AlphabetConverter alphabetConverter = AlphabetConverter .createConverterFromMap (map );
161161 alphabetConverter .decode (null );
162162 assertEquals (1 , alphabetConverter .getEncodedCharLength ());
163163 }
164164
165165 @ Test
166- public void testDoNotEncodeTest () throws UnsupportedEncodingException {
166+ void testDoNotEncodeTest () throws UnsupportedEncodingException {
167167 test (ENGLISH_AND_NUMBERS , LOWER_CASE_ENGLISH_AND_NUMBERS , LOWER_CASE_ENGLISH , "1" , "456" , "abc" , "ABC" , "this will not be converted but THIS WILL" );
168168 test (ENGLISH_AND_NUMBERS , LOWER_CASE_ENGLISH_AND_NUMBERS , NUMBERS , "1" , "456" , "abc" , "ABC" , "this will be converted but 12345 and this will be" );
169169 }
170170
171171 @ Test
172- public void testEncodeFailureTest () {
172+ void testEncodeFailureTest () {
173173 assertEquals ("Couldn't find encoding for '3' in 3" ,
174174 assertThrows (UnsupportedEncodingException .class , () -> test (BINARY , NUMBERS , ArrayUtils .EMPTY_CHARACTER_OBJECT_ARRAY , "3" )).getMessage ());
175175 }
176176
177177 @ Test
178- public void testEquals () {
178+ void testEquals () {
179179 final Character [] characterArray = new Character [2 ];
180180 final char character = 'R' ;
181181 characterArray [0 ] = character ;
@@ -189,15 +189,15 @@ public void testEquals() {
189189 }
190190
191191 @ Test
192- public void testEqualsWithNull () {
192+ void testEqualsWithNull () {
193193 final Character [] characterArray = ArrayUtils .EMPTY_CHARACTER_OBJECT_ARRAY ;
194194 final AlphabetConverter alphabetConverter = AlphabetConverter .createConverterFromChars (characterArray , null , null );
195195
196196 assertFalse (alphabetConverter .equals (null ));
197197 }
198198
199199 @ Test
200- public void testEqualsWithSameObject () {
200+ void testEqualsWithSameObject () {
201201 final Character [] characterArray = new Character [2 ];
202202 final char character = 'R' ;
203203 characterArray [0 ] = character ;
@@ -208,7 +208,7 @@ public void testEqualsWithSameObject() {
208208 }
209209
210210 @ Test
211- public void testHebrewTest () throws UnsupportedEncodingException {
211+ void testHebrewTest () throws UnsupportedEncodingException {
212212 test (HEBREW , BINARY , ArrayUtils .EMPTY_CHARACTER_OBJECT_ARRAY , "\u05d0 " , "\u05e2 " ,
213213 "\u05d0 \u05dc \u05e3 _\u05d0 \u05d5 \u05d4 \u05d1 \u05dc _\u05d1 \u05d9 \u05ea _\u05d6 \u05d4 _\u05d1 \u05d9 \u05ea _"
214214 + "\u05d2 \u05d9 \u05de \u05dc _\u05d6 \u05d4 _\u05db \u05de \u05dc _\u05d2 \u05d3 \u05d5 \u05dc " );
@@ -223,7 +223,7 @@ public void testHebrewTest() throws UnsupportedEncodingException {
223223 * Test example in javadocs for consistency
224224 */
225225 @ Test
226- public void testJavadocExampleTest () throws UnsupportedEncodingException {
226+ void testJavadocExampleTest () throws UnsupportedEncodingException {
227227 final AlphabetConverter ac = createJavadocExample ();
228228
229229 assertEquals ("00" , ac .encode ("a" ));
@@ -234,28 +234,28 @@ public void testJavadocExampleTest() throws UnsupportedEncodingException {
234234 }
235235
236236 @ Test
237- public void testMissingDoNotEncodeLettersFromEncodingTest () {
237+ void testMissingDoNotEncodeLettersFromEncodingTest () {
238238 assertEquals ("Can not use 'do not encode' list because encoding alphabet does not contain '0'" ,
239239 assertThrows (IllegalArgumentException .class , () -> AlphabetConverter .createConverterFromChars (ENGLISH_AND_NUMBERS , LOWER_CASE_ENGLISH , NUMBERS ))
240240 .getMessage ());
241241 }
242242
243243 @ Test
244- public void testMissingDoNotEncodeLettersFromOriginalTest () {
244+ void testMissingDoNotEncodeLettersFromOriginalTest () {
245245 assertEquals ("Can not use 'do not encode' list because original alphabet does not contain '0'" ,
246246 assertThrows (IllegalArgumentException .class , () -> AlphabetConverter .createConverterFromChars (LOWER_CASE_ENGLISH , ENGLISH_AND_NUMBERS , NUMBERS ))
247247 .getMessage ());
248248 }
249249
250250 @ Test
251- public void testNoEncodingLettersTest () {
251+ void testNoEncodingLettersTest () {
252252 assertEquals ("Must have at least two encoding characters (excluding those in the 'do not encode' list), but has 0" ,
253253 assertThrows (IllegalArgumentException .class , () -> AlphabetConverter .createConverterFromChars (ENGLISH_AND_NUMBERS , NUMBERS , NUMBERS ))
254254 .getMessage ());
255255 }
256256
257257 @ Test
258- public void testOnlyOneEncodingLettersTest () {
258+ void testOnlyOneEncodingLettersTest () {
259259 assertEquals ("Must have at least two encoding characters (excluding those in the 'do not encode' list), but has 1" ,
260260 assertThrows (IllegalArgumentException .class , () -> {
261261 final Character [] numbersPlusUnderscore = Arrays .copyOf (NUMBERS , NUMBERS .length + 1 );
@@ -266,14 +266,14 @@ public void testOnlyOneEncodingLettersTest() {
266266 }
267267
268268 @ Test
269- public void testUnexpectedEndWhileDecodingTest () {
269+ void testUnexpectedEndWhileDecodingTest () {
270270 final String toDecode = "00d01d0" ;
271271 assertEquals ("Unexpected end of string while decoding " + toDecode ,
272272 assertThrows (UnsupportedEncodingException .class , () -> createJavadocExample ().decode (toDecode )).getMessage ());
273273 }
274274
275275 @ Test
276- public void testUnexpectedStringWhileDecodingTest () {
276+ void testUnexpectedStringWhileDecodingTest () {
277277 final String toDecode = "00XX" ;
278278 assertEquals ("Unexpected string without decoding (XX) in " + toDecode ,
279279 assertThrows (UnsupportedEncodingException .class , () -> createJavadocExample ().decode (toDecode )).getMessage ());
@@ -283,7 +283,7 @@ public void testUnexpectedStringWhileDecodingTest() {
283283 * Test constructor from code points
284284 */
285285 @ Test
286- public void testUnicodeTest () throws UnsupportedEncodingException {
286+ void testUnicodeTest () throws UnsupportedEncodingException {
287287 final AlphabetConverter ac = AlphabetConverter .createConverter (UNICODE , LOWER_CASE_ENGLISH_CODEPOINTS , DO_NOT_ENCODE_CODEPOINTS );
288288 assertEquals (2 , ac .getEncodedCharLength ());
289289 final String original = "\u8a43 \u8a45 \u8dce ab \u8dc3 c \u8983 " ;
0 commit comments