@@ -0,0 +1,1313 @@
+package beaform;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport java.util.concurrent.Callable;%0Aimport java.util.concurrent.ExecutionException;%0Aimport java.util.concurrent.Future;%0A%0Aimport org.junit.Test;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Aimport beaform.dao.DbTaskHandler;%0A%0A/**%0A * Test some debugging utilities%0A *%0A * @author Steven Post%0A *%0A */%0Apublic class DbTaskHandlerTest %7B%0A%0A%09static final Logger LOG = LoggerFactory.getLogger(DbTaskHandlerTest.class);%0A%09volatile String testString;%0A%0A%09@Test%0A%09public void testCallableAddTask() throws InterruptedException, ExecutionException %7B%0A%09%09final Callable%3CString%3E task = new Callable%3CString%3E() %7B%0A%0A%09%09%09@Override%0A%09%09%09public String call() %7B%0A%09%09%09%09return %22testje%22;%0A%09%09%09%7D%0A%09%09%7D;%0A%09%09final Future%3CString%3E future = DbTaskHandler.addTask(task);%0A%09%09final String resultString = future.get();%0A%09%09assertEquals(%22This isn't the expected string%22, %22testje%22, resultString);%0A%09%7D%0A%0A%09@Test%0A%09public void testRunnableAddTask() throws InterruptedException, ExecutionException %7B%0A%09%09final Runnable task = new Runnable() %7B%0A%0A%09%09%09@Override%0A%09%09%09public void run() %7B%0A%09%09%09%09DbTaskHandlerTest.this.testString = %22teststring%22;%0A%09%09%09%7D%0A%09%09%7D;%0A%09%09final Future%3CVoid%3E future = DbTaskHandler.addTask(task);%0A%09%09future.get();%0A%09%09assertEquals(%22This isn't the expected string%22, %22teststring%22, this.testString);%0A%09%7D%0A%0A%7D%0A

Add tests for the DbTaskHandler