@@ -41,15 +41,15 @@ public void testLongToUint32Bytes() {
4141 public void testIntToBytes () {
4242 int toParse = 5717 ;
4343 byte [] result = ArrayConverter .intToBytes (toParse , 2 );
44- assertArrayEquals ("The conversion result of 5717 should be {0x16} {0x55}" , new byte []{ 0x16 , 0x55 }, result );
44+ assertArrayEquals ("The conversion result of 5717 should be {0x16} {0x55}" , new byte [] { 0x16 , 0x55 }, result );
4545 }
4646
4747 /**
4848 * Test of bytesToInt method, of class ArrayConverter.
4949 */
5050 @ Test
5151 public void testBytesToInt () {
52- byte [] toParse = {0x16 , 0x55 };
52+ byte [] toParse = { 0x16 , 0x55 };
5353 int expectedResult = 5717 ;
5454 assertEquals ("The conversion result of {0x16, 0x55} should be 5717" , expectedResult ,
5555 ArrayConverter .bytesToInt (toParse ));
@@ -75,17 +75,17 @@ public void testBytesToLong() {
7575 */
7676 @ Test
7777 public void testBytesToHexString_byteArr () {
78- byte [] toTest = new byte []{ 0x00 , 0x11 , 0x22 , 0x33 , 0x44 };
78+ byte [] toTest = new byte [] { 0x00 , 0x11 , 0x22 , 0x33 , 0x44 };
7979 assertEquals ("00 11 22 33 44" , ArrayConverter .bytesToHexString (toTest ));
80- toTest = new byte []{ 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , 0x08 };
80+ toTest = new byte [] { 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , 0x08 };
8181 assertEquals ("00 01 02 03 04 05 06 07 08" , ArrayConverter .bytesToHexString (toTest ));
82- toTest = new byte []{ 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , 0x08 , 0x09 , 0x10 };
82+ toTest = new byte [] { 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , 0x08 , 0x09 , 0x10 };
8383 assertEquals ("00 01 02 03 04 05 06 07 08 09 10" , ArrayConverter .bytesToHexString (toTest ));
84- toTest = new byte []{ 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 ,
85- 0x07 ,};
84+ toTest = new byte [] { 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 ,
85+ 0x07 , };
8686 assertEquals ("\n 00 01 02 03 04 05 06 07 00 01 02 03 04 05 06 07" , ArrayConverter .bytesToHexString (toTest ));
87- toTest = new byte []{ 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 ,
88- 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 ,};
87+ toTest = new byte [] { 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 ,
88+ 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , };
8989 assertEquals (
9090 "\n 00 01 02 03 04 05 06 07 00 01 02 03 04 05 06 07\n 00 01 02 03 04 05 06 07 00 01 02 03 04 05 06 07" ,
9191 ArrayConverter .bytesToHexString (toTest ));
@@ -96,9 +96,9 @@ public void testBytesToHexString_byteArr() {
9696 */
9797 @ Test
9898 public void testBytesToHexString_byteArr_boolean () {
99- byte [] toTest = new byte []{ 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 ,
100- 0x05 , 0x06 , 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 ,
101- 0x06 , 0x07 };
99+ byte [] toTest = new byte [] { 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 ,
100+ 0x05 , 0x06 , 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 ,
101+ 0x06 , 0x07 };
102102 assertEquals ("00 01 02 03 04 05 06 07 00 01 02 03 04 05 06 07 00 01 02 03 04 05 06 07 00 01 02 03 04 05 06 07" ,
103103 ArrayConverter .bytesToHexString (toTest , false ));
104104 assertEquals (
@@ -118,9 +118,9 @@ public void testBytesToHexString_3args() {
118118 */
119119 @ Test
120120 public void testBytesToRawHexString () {
121- byte [] toTest = new byte []{ 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 ,
122- 0x05 , 0x06 , 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 ,
123- 0x06 , 0x07 };
121+ byte [] toTest = new byte [] { 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 ,
122+ 0x05 , 0x06 , 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 ,
123+ 0x06 , 0x07 };
124124 assertEquals ("0001020304050607000102030405060700010203040506070001020304050607" ,
125125 ArrayConverter .bytesToRawHexString (toTest ));
126126 }
@@ -173,13 +173,13 @@ public void testConvertListToArray() {
173173 @ Test
174174 public void testHexStringToByteArray () {
175175 String hex = "01" ;
176- assertArrayEquals ("Testing simple one byte hex value" , new byte []{ 0x01 },
176+ assertArrayEquals ("Testing simple one byte hex value" , new byte [] { 0x01 },
177177 ArrayConverter .hexStringToByteArray (hex ));
178178 hex = "FF" ;
179- assertArrayEquals ("Testing one byte hex value > 0x7f" , new byte []{ (byte ) 0xff },
179+ assertArrayEquals ("Testing one byte hex value > 0x7f" , new byte [] { (byte ) 0xff },
180180 ArrayConverter .hexStringToByteArray (hex ));
181181 hex = "FFFFFF" ;
182- assertArrayEquals ("Testing one byte hex value > 0x7f" , new byte []{ (byte ) 0xff , (byte ) 0xff , (byte ) 0xff },
182+ assertArrayEquals ("Testing one byte hex value > 0x7f" , new byte [] { (byte ) 0xff , (byte ) 0xff , (byte ) 0xff },
183183 ArrayConverter .hexStringToByteArray (hex ));
184184 }
185185
@@ -189,7 +189,7 @@ public void testBigIntegerToNullPaddedByteArray() {
189189
190190 assertArrayEquals ("Check zero output size" , new byte [0 ],
191191 ArrayConverter .bigIntegerToNullPaddedByteArray (test , 0 ));
192- assertArrayEquals ("Check check output size smaller than input" , new byte []{ (byte ) 0xEC },
192+ assertArrayEquals ("Check check output size smaller than input" , new byte [] { (byte ) 0xEC },
193193 ArrayConverter .bigIntegerToNullPaddedByteArray (test , 1 ));
194194 assertArrayEquals ("Check output size bigger than input size" ,
195195 ArrayConverter .hexStringToByteArray ("0000000000000000000000001D42C86F7923DFEC" ),
@@ -217,24 +217,24 @@ public void testLongToUint48Bytes() {
217217 @ Test
218218 public void testBytesToHexString_ModifiableByteArray () {
219219 ModifiableByteArray toTest = new ModifiableByteArray ();
220- toTest = ModifiableVariableFactory .safelySetValue (toTest , new byte []{ 0x00 , 0x11 , 0x22 , 0x33 , 0x44 });
220+ toTest = ModifiableVariableFactory .safelySetValue (toTest , new byte [] { 0x00 , 0x11 , 0x22 , 0x33 , 0x44 });
221221 assertEquals ("00 11 22 33 44" , ArrayConverter .bytesToHexString (toTest ));
222222
223- toTest = ModifiableVariableFactory .safelySetValue (toTest , new byte []{ 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 ,
224- 0x06 , 0x07 , 0x08 });
223+ toTest = ModifiableVariableFactory .safelySetValue (toTest , new byte [] { 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 ,
224+ 0x06 , 0x07 , 0x08 });
225225 assertEquals ("00 01 02 03 04 05 06 07 08" , ArrayConverter .bytesToHexString (toTest ));
226226
227- toTest = ModifiableVariableFactory .safelySetValue (toTest , new byte []{ 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 ,
228- 0x06 , 0x07 , 0x08 , 0x09 , 0x10 });
227+ toTest = ModifiableVariableFactory .safelySetValue (toTest , new byte [] { 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 ,
228+ 0x06 , 0x07 , 0x08 , 0x09 , 0x10 });
229229 assertEquals ("00 01 02 03 04 05 06 07 08 09 10" , ArrayConverter .bytesToHexString (toTest ));
230230
231- toTest = ModifiableVariableFactory .safelySetValue (toTest , new byte []{ 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 ,
232- 0x06 , 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 ,});
231+ toTest = ModifiableVariableFactory .safelySetValue (toTest , new byte [] { 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 ,
232+ 0x06 , 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , });
233233 assertEquals ("\n 00 01 02 03 04 05 06 07 00 01 02 03 04 05 06 07" , ArrayConverter .bytesToHexString (toTest ));
234234
235- toTest = ModifiableVariableFactory .safelySetValue (toTest , new byte []{ 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 ,
236- 0x06 , 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 ,
237- 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 ,});
235+ toTest = ModifiableVariableFactory .safelySetValue (toTest , new byte [] { 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 ,
236+ 0x06 , 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 ,
237+ 0x07 , 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , });
238238 assertEquals (
239239 "\n 00 01 02 03 04 05 06 07 00 01 02 03 04 05 06 07\n 00 01 02 03 04 05 06 07 00 01 02 03 04 05 06 07" ,
240240 ArrayConverter .bytesToHexString (toTest ));
@@ -245,9 +245,9 @@ public void testBytesToHexString_ModifiableByteArray() {
245245 */
246246 @ Test
247247 public void testReverseByteOrder () {
248- byte [] array = new byte []{ 0x00 , 0x01 , 0x02 , 0x03 , 0x04 };
248+ byte [] array = new byte [] { 0x00 , 0x01 , 0x02 , 0x03 , 0x04 };
249249
250- assertArrayEquals ("Testing byte order reversion" , new byte []{ 0x04 , 0x03 , 0x02 , 0x01 , 0x00 },
250+ assertArrayEquals ("Testing byte order reversion" , new byte [] { 0x04 , 0x03 , 0x02 , 0x01 , 0x00 },
251251 ArrayConverter .reverseByteOrder (array ));
252252 }
253253
0 commit comments