@@ -39,10 +39,10 @@ public class ModifiableByteArrayTest {
3939
4040 @ Before
4141 public void setUp () {
42- originalValue = new byte []{ (byte ) 0 , (byte ) 1 , (byte ) 2 , (byte ) 3 , (byte ) 4 , (byte ) 5 , (byte ) 6 };
43- modification1 = new byte []{ (byte ) 2 , (byte ) 3 };
44- modification2 = new byte []{ (byte ) 2 , (byte ) 1 , (byte ) 0 , (byte ) 1 , (byte ) 2 , (byte ) 3 , (byte ) 4 , (byte ) 5 ,
45- (byte ) 6 };
42+ originalValue = new byte [] { (byte ) 0 , (byte ) 1 , (byte ) 2 , (byte ) 3 , (byte ) 4 , (byte ) 5 , (byte ) 6 };
43+ modification1 = new byte [] { (byte ) 2 , (byte ) 3 };
44+ modification2 = new byte [] { (byte ) 2 , (byte ) 1 , (byte ) 0 , (byte ) 1 , (byte ) 2 , (byte ) 3 , (byte ) 4 , (byte ) 5 ,
45+ (byte ) 6 };
4646 start = new ModifiableByteArray ();
4747 start .setOriginalValue (originalValue );
4848 }
@@ -362,13 +362,13 @@ public void testInsertBytes() {
362362 @ Test
363363 public void testIsOriginalValueModified () {
364364 assertFalse (start .isOriginalValueModified ());
365- VariableModification <byte []> modifier = ByteArrayModificationFactory .xor (new byte []{}, 0 );
365+ VariableModification <byte []> modifier = ByteArrayModificationFactory .xor (new byte [] {}, 0 );
366366 start .setModification (modifier );
367367 assertFalse (start .isOriginalValueModified ());
368- modifier = ByteArrayModificationFactory .xor (new byte []{ 1 }, 0 );
368+ modifier = ByteArrayModificationFactory .xor (new byte [] { 1 }, 0 );
369369 start .setModification (modifier );
370370 assertTrue (start .isOriginalValueModified ());
371- modifier = ByteArrayModificationFactory .xor (new byte []{ 0 , 0 }, originalValue .length - 2 );
371+ modifier = ByteArrayModificationFactory .xor (new byte [] { 0 , 0 }, originalValue .length - 2 );
372372 start .setModification (modifier );
373373 assertFalse (start .isOriginalValueModified ());
374374 }
@@ -399,13 +399,13 @@ public void testExplicitValueFromFile() {
399399
400400 modifier = ByteArrayModificationFactory .explicitValueFromFile (1 );
401401 start .setModification (modifier );
402- expectedResult = new byte []{ 00 };
402+ expectedResult = new byte [] { 00 };
403403 result = start .getValue ();
404404 assertArrayEquals (expectedResult , result );
405405
406406 modifier = ByteArrayModificationFactory .explicitValueFromFile (17 );
407407 start .setModification (modifier );
408- expectedResult = new byte []{ (byte ) 255 };
408+ expectedResult = new byte [] { (byte ) 255 };
409409 result = start .getValue ();
410410 assertArrayEquals (expectedResult , result );
411411 }
@@ -416,30 +416,32 @@ public void testExplicitValueFromFile() {
416416 @ Test
417417 public void testShuffle () {
418418 LOGGER .info ("testShuffle" );
419- VariableModification <byte []> modifier = ByteArrayModificationFactory .shuffle (new byte []{ 0 , 1 });
419+ VariableModification <byte []> modifier = ByteArrayModificationFactory .shuffle (new byte [] { 0 , 1 });
420420 start .setModification (modifier );
421- byte [] result = {1 , 0 , 2 , 3 , 4 , 5 , 6 };
421+ byte [] result = { 1 , 0 , 2 , 3 , 4 , 5 , 6 };
422422 assertArrayEquals (result , start .getValue ());
423423
424- modifier = ByteArrayModificationFactory .shuffle (new byte []{ 0 , 1 , 2 , 3 , 4 , 5 , 6 });
424+ modifier = ByteArrayModificationFactory .shuffle (new byte [] { 0 , 1 , 2 , 3 , 4 , 5 , 6 });
425425 start .setModification (modifier );
426- result = new byte []{ 1 , 0 , 3 , 2 , 5 , 4 , 6 };
426+ result = new byte [] { 1 , 0 , 3 , 2 , 5 , 4 , 6 };
427427 assertArrayEquals (result , start .getValue ());
428428
429- modifier = ByteArrayModificationFactory .shuffle (new byte []{ 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 });
429+ modifier = ByteArrayModificationFactory .shuffle (new byte [] { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 });
430430 start .setModification (modifier );
431- result = new byte []{ 6 , 0 , 3 , 2 , 5 , 4 , 1 };
431+ result = new byte [] { 6 , 0 , 3 , 2 , 5 , 4 , 1 };
432432 assertArrayEquals (result , start .getValue ());
433433 }
434434
435435 @ Test
436436 public void toStringTest () {
437437 ModifiableByteArray toTest = new ModifiableByteArray ();
438- toTest = ModifiableVariableFactory .safelySetValue (toTest , new byte []{ 0x00 , 0x11 , 0x22 , 0x33 , 0x44 });
438+ toTest = ModifiableVariableFactory .safelySetValue (toTest , new byte [] { 0x00 , 0x11 , 0x22 , 0x33 , 0x44 });
439439 assertEquals ("Original byte value is: 00 11 22 33 44" , toTest .toString ());
440440
441- VariableModification modificatoin = new ByteArrayExplicitValueModification (new byte []{0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , 0x08 });
441+ VariableModification modificatoin = new ByteArrayExplicitValueModification (new byte [] { 0x00 , 0x01 , 0x02 , 0x03 ,
442+ 0x04 , 0x05 , 0x06 , 0x07 , 0x08 });
442443 toTest .setModification (modificatoin );
443- assertEquals ("Actual byte value is: 00 01 02 03 04 05 06 07 08\n Original value was: 00 11 22 33 44" , toTest .toString ());
444+ assertEquals ("Actual byte value is: 00 01 02 03 04 05 06 07 08\n Original value was: 00 11 22 33 44" ,
445+ toTest .toString ());
444446 }
445447}
0 commit comments