package eu.nerro.wolappla.entity;

import org.junit.Test;

import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.junit.Assert.assertThat;

public class MagicPacketTest {
  @Test
  public void getSynchronizationStream_shouldNotBeNull() {
    MagicPacket magicPacket = new MagicPacket();
    byte[] synchronizationStream = magicPacket.getSynchronizationStream();

    assertThat(synchronizationStream, is(notNullValue()));
  }

  @Test
  public void getSynchronizationStream_arrayLengthShouldBeSix() {
    MagicPacket magicPacket = new MagicPacket();
    byte[] stream = magicPacket.getSynchronizationStream();

    assertThat(stream.length, is(6));
  }

  @Test
  public void getSynchronizationStream_shouldContainSixBytesOf0xFF() {
    MagicPacket magicPacket = new MagicPacket();
    byte[] actualStream = magicPacket.getSynchronizationStream();
    byte[] expectedStream = {(byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff};

    assertThat(actualStream, equalTo(expectedStream));
  }
}

package eu.nerro.wolappla.entity;

import org.junit.Test;

import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.junit.Assert.assertThat;

public class MagicPacketTest {
  @Test
  public void getSynchronizationStream_shouldNotBeNull() {
    MagicPacket magicPacket = new MagicPacket();
    byte[] synchronizationStream = magicPacket.getSynchronizationStream();

    assertThat(synchronizationStream, is(notNullValue()));
  }

  @Test
  public void getSynchronizationStream_lengthShouldBeSix() {
    MagicPacket magicPacket = new MagicPacket();
    byte[] stream = magicPacket.getSynchronizationStream();

    assertThat(stream.length, is(6));
  }

  @Test
  public void getSynchronizationStream_shouldBeSixBytesOf0xff() {
    MagicPacket magicPacket = new MagicPacket();
    byte[] actualStream = magicPacket.getSynchronizationStream();
    byte[] expectedStream = {(byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff};

    assertThat(actualStream, equalTo(expectedStream));
  }
}

--- 
+++ 
@@ -17,7 +17,7 @@
   }
 
   @Test
-  public void getSynchronizationStream_lengthShouldBeSix() {
+  public void getSynchronizationStream_arrayLengthShouldBeSix() {
     MagicPacket magicPacket = new MagicPacket();
     byte[] stream = magicPacket.getSynchronizationStream();
 
@@ -25,7 +25,7 @@
   }
 
   @Test
-  public void getSynchronizationStream_shouldBeSixBytesOf0xff() {
+  public void getSynchronizationStream_shouldContainSixBytesOf0xFF() {
     MagicPacket magicPacket = new MagicPacket();
     byte[] actualStream = magicPacket.getSynchronizationStream();
     byte[] expectedStream = {(byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff};
Use better method names in unit test of magic packet
