3030public class BytesToConvertOtherTypesTest extends ABytesTest {
3131
3232 @ Test
33- public void toObjectArray () throws Exception {
33+ public void toObjectArray () {
3434 checkArray (example_bytes_empty );
3535 checkArray (example_bytes_one );
3636 checkArray (example_bytes_two );
@@ -40,15 +40,15 @@ public void toObjectArray() throws Exception {
4040 }
4141
4242 private void checkArray (byte [] array ) {
43- Byte [] byteArray = Bytes .from (array ).toObjectArray ();
43+ Byte [] byteArray = Bytes .from (array ).toBoxedArray ();
4444 assertEquals (array .length , byteArray .length );
4545 for (int i = 0 ; i < array .length ; i ++) {
4646 assertEquals (byteArray [i ], Byte .valueOf (array [i ]));
4747 }
4848 }
4949
5050 @ Test
51- public void toList () throws Exception {
51+ public void toList () {
5252 checkList (example_bytes_empty );
5353 checkList (example_bytes_one );
5454 checkList (example_bytes_two );
@@ -66,7 +66,7 @@ private void checkList(byte[] array) {
6666 }
6767
6868 @ Test
69- public void toBitSet () throws Exception {
69+ public void toBitSet () {
7070 assertArrayEquals (example_bytes_empty , Bytes .from (example_bytes_empty ).toBitSet ().toByteArray ());
7171 assertArrayEquals (example_bytes_one , Bytes .from (example_bytes_one ).toBitSet ().toByteArray ());
7272 assertArrayEquals (example_bytes_two , Bytes .from (example_bytes_two ).toBitSet ().toByteArray ());
@@ -76,7 +76,7 @@ public void toBitSet() throws Exception {
7676 }
7777
7878 @ Test
79- public void toByte () throws Exception {
79+ public void toByte () {
8080 assertEquals (example_bytes_one [0 ], Bytes .from (example_bytes_one ).toByte ());
8181 assertEquals ((byte ) 0 , Bytes .from (new byte [1 ]).toByte ());
8282 assertEquals (-1 , Bytes .from ((byte ) 0b1111_1111).toByte ());
@@ -89,7 +89,7 @@ public void toByte() throws Exception {
8989 }
9090
9191 @ Test
92- public void toUnsignedByte () throws Exception {
92+ public void toUnsignedByte () {
9393 assertEquals (example_bytes_one [0 ], Bytes .from (example_bytes_one ).toUnsignedByte ());
9494 assertEquals ((byte ) 0 , Bytes .from (new byte [1 ]).toUnsignedByte ());
9595 assertEquals (255 , Bytes .from ((byte ) 0b1111_1111).toUnsignedByte ());
@@ -102,7 +102,7 @@ public void toUnsignedByte() throws Exception {
102102 }
103103
104104 @ Test
105- public void toChar () throws Exception {
105+ public void toChar () {
106106 assertEquals (6767 , Bytes .from (example_bytes_two ).toChar ());
107107 assertEquals (Bytes .from (example_bytes_two ).toShort (), Bytes .from (example_bytes_two ).toChar ());
108108 assertEquals ((char ) 0 , Bytes .from (new byte [2 ]).toChar ());
@@ -120,7 +120,7 @@ public void toChar() throws Exception {
120120 }
121121
122122 @ Test
123- public void toShort () throws Exception {
123+ public void toShort () {
124124 assertEquals (6767 , Bytes .from (example_bytes_two ).toShort ());
125125 assertEquals (Bytes .from (example_bytes_one ).toByte (), Bytes .from ((byte ) 0 , example_bytes_one ).toShort ());
126126 assertEquals ((short ) 0 , Bytes .from (new byte [2 ]).toShort ());
@@ -138,7 +138,7 @@ public void toShort() throws Exception {
138138 }
139139
140140 @ Test
141- public void toInt () throws Exception {
141+ public void toInt () {
142142 assertEquals (591065872 , Bytes .from (example_bytes_four ).toInt ());
143143 assertEquals (Bytes .from (new byte []{0 , 0 , 0 , 0 }, example_bytes_four ).toLong (), Bytes .from (example_bytes_four ).toInt ());
144144
@@ -161,7 +161,7 @@ public void toInt() throws Exception {
161161 }
162162
163163 @ Test
164- public void toLong () throws Exception {
164+ public void toLong () {
165165 assertEquals (-1237929515650418679L , Bytes .from (example_bytes_eight ).toLong ());
166166
167167 assertEquals (example_bytes_one [0 ], Bytes .from (new byte []{0 , 0 , 0 , 0 , 0 , 0 , 0 }, example_bytes_one ).toLong ());
@@ -181,7 +181,7 @@ public void toLong() throws Exception {
181181 }
182182
183183 @ Test
184- public void toFloat () throws Exception {
184+ public void toFloat () {
185185 assertEquals (1.0134550690550691E-17 , Bytes .from (example_bytes_four ).toFloat (), 0.001 );
186186
187187 assertEquals (5.1E-322 , Bytes .from (new byte []{0 , 0 , 0 }, example_bytes_one ).toFloat (), 0.001 );
@@ -201,7 +201,7 @@ public void toFloat() throws Exception {
201201 }
202202
203203 @ Test
204- public void toDouble () throws Exception {
204+ public void toDouble () {
205205 assertEquals (-6.659307728279082E225 , Bytes .from (example_bytes_eight ).toDouble (), 0.001 );
206206
207207 assertEquals (5.1E-322 , Bytes .from (new byte []{0 , 0 , 0 , 0 , 0 , 0 , 0 }, example_bytes_one ).toDouble (), 0.001 );
0 commit comments