// Path: hazeltask-core/src/main/java/com/hazeltask/executor/task/DefaultTaskIdAdapter.java
// public class DefaultTaskIdAdapter implements TaskIdAdapter<Object, Integer, Serializable> {
//     private static int GROUP = Integer.MIN_VALUE;
// 
//     @Override
//     public Integer getTaskGroup(Object task) {
//         return GROUP;
//     }
// 
//     @Override
//     public boolean supports(Object task) {
//         //we support all objects!
//         return true;
//     }
// 
//     @Override
//     public Serializable getTaskInfo(Object task) {
//         return null;
//     }
// }
// 
// Path: hazeltask-core/src/main/java/com/hazeltask/executor/task/TaskIdAdapter.java
// public interface TaskIdAdapter<T, GROUP extends Serializable, INFO extends Serializable> {
//     
//     /**
//      * This might be useful to fill out to be able to get at task information
//      * without having to deserialize the entire task. It is also the only
//      * task-specific identifiable information available in TaskResponseListener
//      * 
//      * @param task
//      * @return
//      */
//     public INFO getTaskInfo(T task);
//     
//     /**
//      * The group does not need to be equal for successive calls with the same task
//      * @param task
//      * @return
//      */
//     public GROUP getTaskGroup(T task);
//     
//     /**
//      * Given an object, return whether this adapater supports identifying the group
//      * Generally the logic is: <code>return task instanceof T</code>
//      * 
//      * We have this here as a validation step when you submit a Runnable to the ExecutorService.
//      * Since ExecutorService isn't generic, we need to take extra steps to ensure the task
//      * is able to be processed by the system
//      * 
//      * @param task
//      * @return
//      */
//     public boolean supports(Object task);
// }


import static org.junit.Assert.*;
import java.io.Serializable;
import junit.framework.Assert;
import org.junit.Before;
import org.junit.Test;
import com.hazeltask.executor.task.DefaultTaskIdAdapter;
import com.hazeltask.executor.task.TaskIdAdapter;
//    }
    
    @Test
    public void fixedThreadPoolTest_1() {
        assertEquals(4, config.getThreadCount());
        assertEquals(4, config.getMaxThreadPoolSize());
        config.withThreadCount(10);
        assertEquals(10, config.getThreadCount());
        assertEquals(10, config.getMaxThreadPoolSize());
    }
    
    @Test
    public void maxThreadKeepAlive() {
        assertEquals(60000, config.getMaxThreadKeepAliveTime());
        config.withMaxThreadKeepAliveTime(1);
        assertEquals(1, config.getMaxThreadKeepAliveTime());
    }
    
    @Test
    public void taskIdAdapter() {
        TaskIdAdapter tmp = new TaskIdAdapter() {
            public Serializable getTaskGroup(Object task) {return null;}

            public boolean supports(Object task) {return false;}

            @Override
            public Serializable getTaskInfo(Object task) {
                return null;
            }
        };
// Path: hazeltask-core/src/main/java/com/hazeltask/executor/task/DefaultTaskIdAdapter.java
// public class DefaultTaskIdAdapter implements TaskIdAdapter<Object, Integer, Serializable> {
//     private static int GROUP = Integer.MIN_VALUE;
// 
//     @Override
//     public Integer getTaskGroup(Object task) {
//         return GROUP;
//     }
// 
//     @Override
//     public boolean supports(Object task) {
//         //we support all objects!
//         return true;
//     }
// 
//     @Override
//     public Serializable getTaskInfo(Object task) {
//         return null;
//     }
// }
// 
// Path: hazeltask-core/src/main/java/com/hazeltask/executor/task/TaskIdAdapter.java
// public interface TaskIdAdapter<T, GROUP extends Serializable, INFO extends Serializable> {
//     
//     /**
//      * This might be useful to fill out to be able to get at task information
//      * without having to deserialize the entire task. It is also the only
//      * task-specific identifiable information available in TaskResponseListener
//      * 
//      * @param task
//      * @return
//      */
//     public INFO getTaskInfo(T task);
//     
//     /**
//      * The group does not need to be equal for successive calls with the same task
//      * @param task
//      * @return
//      */
//     public GROUP getTaskGroup(T task);
//     
//     /**
//      * Given an object, return whether this adapater supports identifying the group
//      * Generally the logic is: <code>return task instanceof T</code>
//      * 
//      * We have this here as a validation step when you submit a Runnable to the ExecutorService.
//      * Since ExecutorService isn't generic, we need to take extra steps to ensure the task
//      * is able to be processed by the system
//      * 
//      * @param task
//      * @return
//      */
//     public boolean supports(Object task);
// }


// Path: hazeltask-core/src/test/java/com/hazeltask/config/ExecutorConfigTest.java
import static org.junit.Assert.*;
import java.io.Serializable;
import junit.framework.Assert;
import org.junit.Before;
import org.junit.Test;
import com.hazeltask.executor.task.DefaultTaskIdAdapter;
import com.hazeltask.executor.task.TaskIdAdapter;

//    }
    
    @Test
    public void fixedThreadPoolTest_1() {
        assertEquals(4, config.getThreadCount());
        assertEquals(4, config.getMaxThreadPoolSize());
        config.withThreadCount(10);
        assertEquals(10, config.getThreadCount());
        assertEquals(10, config.getMaxThreadPoolSize());
    }
    
    @Test
    public void maxThreadKeepAlive() {
        assertEquals(60000, config.getMaxThreadKeepAliveTime());
        config.withMaxThreadKeepAliveTime(1);
        assertEquals(1, config.getMaxThreadKeepAliveTime());
    }
    
    @Test
    public void taskIdAdapter() {
        TaskIdAdapter tmp = new TaskIdAdapter() {
            public Serializable getTaskGroup(Object task) {return null;}

            public boolean supports(Object task) {return false;}

            @Override
            public Serializable getTaskInfo(Object task) {
                return null;
            }
        };
        assertEquals(DefaultTaskIdAdapter.class, config.getTaskIdAdapter().getClass());