package org.devilry.core.session.dao;

import java.util.List;
import javax.naming.NamingException;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;

//public class DeliveryCandidateImplTest extends AbstractDeliveryDaoTst {
//
//	DeliveryCandidateRemote deliveryCandidate;
//	long deliveryCandidateId;
//
//	@Before
//	public void setUp() throws NamingException {
//		setupEjbContainer();
//		deliveryCandidate = getRemoteBean(DeliveryCandidateImpl.class);
//		deliveryCandidateId = deliveryCandidate.create();
//	}
//
//	@After
//	public void tearDown() {
//	}
//
//	@Test
//	public void addFile() {
//		
//		long id1 = deliveryCandidate.addFile(deliveryCandidateId, "test.txt");
//		long id2 = deliveryCandidate.addFile(deliveryCandidateId, "test2.txt");
//		assertFalse(id1 == id2);
//		
//		List<Long> fileIds = deliveryCandidate.getFiles(deliveryCandidateId);
//		assertEquals(2, fileIds.size());
//	}
//
//
//	@Test
//	public void getFiles() throws NamingException {
//	
//		long id1 = deliveryCandidate.addFile(deliveryCandidateId, "b");
//		long id2 = deliveryCandidate.addFile(deliveryCandidateId, "a");
//		long id3 = deliveryCandidate.addFile(deliveryCandidateId, "c");
//		List<Long> fileIds = deliveryCandidate.getFiles(deliveryCandidateId);
//		assertEquals(3, fileIds.size());
//		
//		assertTrue(fileIds.contains(id1));
//		assertTrue(fileIds.contains(id2));
//		assertTrue(fileIds.contains(id3));
//	}
//	
//	
//	@Test
//	public void getAndSetStatus() {
//		deliveryCandidate.setStatus(deliveryCandidateId, 0);
//		assertEquals(0, deliveryCandidate.getStatus(deliveryCandidateId));
//	}
//	
//}
@@ -199,18 +199,16 @@
 ert.*;%0A%0A
-//
 public c
@@ -271,21 +271,63 @@
 aoTst %7B%0A
-//%0A//
+%0A%09DeliveryRemote delivery;%0A%09long deliveryId;%0A%09%0A
 %09Deliver
@@ -362,18 +362,16 @@
 didate;%0A
-//
 %09long de
@@ -389,21 +389,17 @@
 dateId;%0A
-//%0A//
+%0A
 %09@Before
@@ -399,18 +399,16 @@
 @Before%0A
-//
 %09public 
@@ -445,18 +445,16 @@
 ption %7B%0A
-//
 %09%09setupE
@@ -468,18 +468,174 @@
 iner();%0A
-//
+%09%09%0A%09%09// Set up a delivery%0A%09%09delivery = getRemoteBean(DeliveryImpl.class);%0A%09%09deliveryId = delivery.create(deliveryCandidateId);%0A%09%09%0A%09%09// Add delivery candidate%0A
 %09%09delive
@@ -692,18 +692,16 @@
 class);%0A
-//
 %09%09delive
@@ -745,29 +745,33 @@
 ate(
+deliveryId
 );%0A
-//
 %09%7D%0A
-//%0A//
+%0A
 %09@After%0A
 //%09p
@@ -766,18 +766,16 @@
 %09@After%0A
-//
 %09public 
@@ -796,27 +796,47 @@
 ) %7B%0A
-//%09%7D%0A//%0A//
+%09%09periodNode.remove(uioId);%0A%09%7D%0A%0A
 %09@Test%0A
-//
 %09pub
@@ -856,23 +856,19 @@
 ile() %7B%0A
-//
 %09%09%0A
-//
 %09%09long i
@@ -928,26 +928,24 @@
 test.txt%22);%0A
-//
 %09%09long id2 =
@@ -1006,18 +1006,16 @@
 .txt%22);%0A
-//
 %09%09assert
@@ -1033,23 +1033,19 @@
 = id2);%0A
-//
 %09%09%0A
-//
 %09%09List%3CL
@@ -1100,34 +1100,32 @@
 ryCandidateId);%0A
-//
 %09%09assertEquals(2
@@ -1147,30 +1147,20 @@
 ));%0A
-//
 %09%7D%0A
-//%0A//%0A//
+%0A%0A
 %09@Test%0A
-//
 %09pub
@@ -1204,22 +1204,18 @@
 ption %7B%0A
-//%09%0A//
+%09%0A
 %09%09long i
@@ -1268,26 +1268,24 @@
 teId, %22b%22);%0A
-//
 %09%09long id2 =
@@ -1338,18 +1338,16 @@
 , %22a%22);%0A
-//
 %09%09long i
@@ -1404,18 +1404,16 @@
 , %22c%22);%0A
-//
 %09%09List%3CL
@@ -1476,18 +1476,16 @@
 ateId);%0A
-//
 %09%09assert
@@ -1515,15 +1515,11 @@
 ));%0A
-//
 %09%09%0A
-//
 %09%09as
@@ -1547,26 +1547,24 @@
 ains(id1));%0A
-//
 %09%09assertTrue
@@ -1588,18 +1588,16 @@
 (id2));%0A
-//
 %09%09assert
@@ -1629,32 +1629,22 @@
 ));%0A
-//
 %09%7D%0A
-//%09%0A//%09%0A//
+%09%0A%09%0A
 %09@Test%0A
-//
 %09pub
@@ -1672,18 +1672,16 @@
 tus() %7B%0A
-//
 %09%09delive
@@ -1727,18 +1727,16 @@
 Id, 0);%0A
-//
 %09%09assert
@@ -1800,16 +1800,10 @@
 ));%0A
-//
 %09%7D%0A
-//%09%0A//
+%09%0A
 %7D

Use new create method and added teardown content