import me.jesensky.dan.playertracker.exceptions.InvalidPacketException;
import me.jesensky.dan.playertracker.net.packets.Packet;
import me.jesensky.dan.playertracker.net.packets.PacketType;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public class TestPacket {
    @Test
    public void packetHeader() throws InvalidPacketException {
        Packet packet = new Packet(PacketType.LOGIN, new byte[]{3, 4, 6, 3, 1, 6});
        Assert.assertEquals(packet.getType(), PacketType.LOGIN);
    }

    @Test
    public void _packetHeader() throws InvalidPacketException {
        Packet packet = new Packet(PacketType.LOGIN, new byte[]{3, 4, 6, 3, 1, 6});
        Assert.assertArrayEquals(packet.getType().getHeader(), new byte[]{1, 0, 1});
    }

    @Test
    public void ammendedData() throws InvalidPacketException {
        Packet packet = new Packet(PacketType.LOGIN, new byte[]{3, 4, 6, 3, 1, 6});
        Assert.assertArrayEquals(packet.getAmmendedData(), new byte[]{1, 0, 1, 3, 4, 6, 3, 1, 6});
    }
}
@@ -298,16 +298,62 @@
 Unit4;%0A%0A
+import java.io.UnsupportedEncodingException;%0A%0A
 @RunWith
@@ -1133,10 +1133,311 @@
 );%0A    %7D
+%0A%0A    @Test%0A    public void ensureNoBytesMatchDataSeparator() throws UnsupportedEncodingException%7B%0A        byte%5B%5D bytes = %22asdfghjkl;'zxcvbnm,./%5D%5Bpoiuytrewq%5C%5C+_-=)0(9*&%5E%25$#@!~%6012345678%7B%7D%7C:%5C%22%3C%3E?%22.getBytes(%22UTF-8%22);%0A        for(byte b : bytes)%0A            if(b == 0)%0A                Assert.fail();%0A    %7D
 %0A%7D

Add sanity check for packets