// Path: src/main/java/net/utp4j/data/UtpPacketUtils.java
// public static final byte DATA = (byte) (VERSION | longToUbyte(0));
// 
// Path: src/main/java/net/utp4j/data/UtpPacketUtils.java
// public static final byte FIN = (byte) (VERSION | longToUbyte(16));
// 
// Path: src/main/java/net/utp4j/data/UtpPacketUtils.java
// public static final byte RESET = (byte) (VERSION | longToUbyte(48));
// 
// Path: src/main/java/net/utp4j/data/UtpPacketUtils.java
// public static final byte STATE = (byte) (VERSION | longToUbyte(32));
// 
// Path: src/main/java/net/utp4j/data/UtpPacketUtils.java
// public static final byte SYN = (byte) (VERSION | longToUbyte(64));
// 
// Path: src/main/java/net/utp4j/data/UtpPacketUtils.java
// public static byte[] joinByteArray(byte[] array1, byte[] array2) {
// 		
// 	int length1 = array1 == null ? 0 : array1.length;
// 	int length2 = array2 == null ? 0 : array2.length;
// 
// 		
// 	int totalLength = length1 + length2;
// 	byte[] returnArray = new byte[totalLength];
// 		
// 	int i = 0;
// 	for (; i < length1; i++) {
// 		returnArray[i] = array1[i];
// 	}
// 		
// 	for (int j = 0; j < length2; j++) {
// 		returnArray[i] = array2[j];
// 		i++;
// 	}
// 		
// 	return returnArray;
// 		
// }


import static net.utp4j.data.UtpPacketUtils.DATA;
import static net.utp4j.data.UtpPacketUtils.FIN;
import static net.utp4j.data.UtpPacketUtils.RESET;
import static net.utp4j.data.UtpPacketUtils.STATE;
import static net.utp4j.data.UtpPacketUtils.SYN;
import static net.utp4j.data.UtpPacketUtils.joinByteArray;
import static org.junit.Assert.assertEquals;
import org.junit.Test;

	 * Tests joinArray() with two arrays, first array is empty.
	 */
	@Test
	public void testJoinArrayEmptyFrist() {
		byte[] array1 = {};
		byte[] array2 = {3, 4, 5};
		
		byte[] returnArray = joinByteArray(array1, array2);
		
		assertEquals(3, returnArray.length);
		
		assertEquals(3, returnArray[0]);
		assertEquals(4, returnArray[1]);		
		assertEquals(5, returnArray[2]);

	}
	
	
	/**
	 * Tests joinArray() with two arrays, second array is empty.
	 */
	@Test
	public void testJoinArrayEmptySecond() {
		byte[] array1 = {3, 4, 5};
		byte[] array2 = {};
		
		byte[] returnArray = joinByteArray(array1, array2);
		
		assertEquals(3, returnArray.length);
		

// Path: src/main/java/net/utp4j/data/UtpPacketUtils.java
// public static final byte DATA = (byte) (VERSION | longToUbyte(0));
// 
// Path: src/main/java/net/utp4j/data/UtpPacketUtils.java
// public static final byte FIN = (byte) (VERSION | longToUbyte(16));
// 
// Path: src/main/java/net/utp4j/data/UtpPacketUtils.java
// public static final byte RESET = (byte) (VERSION | longToUbyte(48));
// 
// Path: src/main/java/net/utp4j/data/UtpPacketUtils.java
// public static final byte STATE = (byte) (VERSION | longToUbyte(32));
// 
// Path: src/main/java/net/utp4j/data/UtpPacketUtils.java
// public static final byte SYN = (byte) (VERSION | longToUbyte(64));
// 
// Path: src/main/java/net/utp4j/data/UtpPacketUtils.java
// public static byte[] joinByteArray(byte[] array1, byte[] array2) {
// 		
// 	int length1 = array1 == null ? 0 : array1.length;
// 	int length2 = array2 == null ? 0 : array2.length;
// 
// 		
// 	int totalLength = length1 + length2;
// 	byte[] returnArray = new byte[totalLength];
// 		
// 	int i = 0;
// 	for (; i < length1; i++) {
// 		returnArray[i] = array1[i];
// 	}
// 		
// 	for (int j = 0; j < length2; j++) {
// 		returnArray[i] = array2[j];
// 		i++;
// 	}
// 		
// 	return returnArray;
// 		
// }


// Path: src/test/java/net/utp4j/data/bytes/UtpPacketUtilsTest.java
import static net.utp4j.data.UtpPacketUtils.DATA;
import static net.utp4j.data.UtpPacketUtils.FIN;
import static net.utp4j.data.UtpPacketUtils.RESET;
import static net.utp4j.data.UtpPacketUtils.STATE;
import static net.utp4j.data.UtpPacketUtils.SYN;
import static net.utp4j.data.UtpPacketUtils.joinByteArray;
import static org.junit.Assert.assertEquals;
import org.junit.Test;

	 * Tests joinArray() with two arrays, first array is empty.
	 */
	@Test
	public void testJoinArrayEmptyFrist() {
		byte[] array1 = {};
		byte[] array2 = {3, 4, 5};
		
		byte[] returnArray = joinByteArray(array1, array2);
		
		assertEquals(3, returnArray.length);
		
		assertEquals(3, returnArray[0]);
		assertEquals(4, returnArray[1]);		
		assertEquals(5, returnArray[2]);

	}
	
	
	/**
	 * Tests joinArray() with two arrays, second array is empty.
	 */
	@Test
	public void testJoinArrayEmptySecond() {
		byte[] array1 = {3, 4, 5};
		byte[] array2 = {};
		
		byte[] returnArray = joinByteArray(array1, array2);
		
		assertEquals(3, returnArray.length);
		

		assertEquals(3, returnArray[0]);
