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));
  }
}

@@ -577,17 +577,22 @@
 nStream_
-l
+arrayL
 engthSho
@@ -810,18 +810,23 @@
 m_should
-Be
+Contain
 SixBytes
@@ -829,18 +829,18 @@
 ytesOf0x
-ff
+FF
 () %7B%0A   

Use better method names in unit test of magic packet