package com.m4gik.util;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;

import java.util.Arrays;
import java.util.Collection;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;

/**
 * 
 * This class contains JUnit tests for class {@link Util}.
 * 
 * @author Michał Szczygieł <michal.szczygiel@wp.pl>
 * 
 */
@RunWith(Parameterized.class)
public class UtilTest {

    @Parameterized.Parameters
    public static Collection<Object[]> data() {
        return Arrays.asList(new Object[][] {
                { new String("test").getBytes() },
                { new Integer(8).byteValue() } });
    }

    private final Object input;

    public UtilTest(Object input) {
        this.input = input;
    }

    @Test
    public void testInputIsNotNull() {
        assertThat(input, is(notNullValue()));
    }

}

@@ -600,16 +600,33 @@
 n Arrays
+%0A                
 .asList(
@@ -654,24 +654,32 @@
             
+       
+ 
 %7B new String
@@ -684,14 +684,75 @@
 ng(%22
-test%22)
+713502673d67e5fa557629a71d331945%22)%0A                                
 .get
@@ -782,38 +782,111 @@
     
+  
-%7B new Integer(8).byteValue
+      %7B new String(%226eece560a2e8d6b919e81fe91b0e7156%22)%0A                                .getBytes
 () %7D
+,
  %7D);
@@ -1100,10 +1100,173 @@
 %0A    %7D%0A%0A
+    @Test(%0A            expected = NumberFormatException.class)%0A    public void testThrowIfGivenStingIsNotHexValue() %7B%0A        Util.toString((byte%5B%5D) input);%0A    %7D%0A
 %7D%0A

Create TDD test for Util class.