@@ -0,0 +1,1778 @@
+package gov.nih.nci.cabig.caaers.web;%0A%0Aimport gov.nih.nci.cabig.caaers.domain.Agent;%0Aimport gov.nih.nci.cabig.caaers.domain.repository.AgentRepository;%0Aimport gov.nih.nci.cabig.caaers.web.search.SearchStudyAjaxFacade;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.HashMap;%0Aimport java.util.List;%0A%0Aimport org.easymock.classextension.EasyMock;%0Aimport org.springframework.mock.web.MockHttpServletRequest;%0A%0Apublic class SearchStudyAjaxFacadeTest extends DwrFacadeTestCase %7B%0A%0A%09private SearchStudyAjaxFacade searchStudyAjaxFacade;%0A%09private AgentRepository agentRepository;%0A%09private List%3CAgent%3E agents;%0A%09private MockHttpServletRequest request;%0A%09%0A%09@Override%0A%09protected void setUp() throws Exception %7B%0A%09%09super.setUp();%0A%09%09searchStudyAjaxFacade = new SearchStudyAjaxFacade();%0A%09%09agentRepository = registerMockFor(AgentRepository.class);%0A%09%09searchStudyAjaxFacade.setAgentRepository(agentRepository);%0A%09%09agents = new ArrayList%3CAgent%3E();%0A%09%09Agent agent = new Agent();%0A%09%09agent.setId(1);%0A%09%09agent.setName(%22name1%22);%0A%09%09agent.setNscNumber(%22nsc1%22);%0A%09%09agent.setRetiredIndicator(true);%0A%09%09agent.setDescription(%22desc1%22);%0A%09%09agents.add(agent);%0A%09%09agent = new Agent();%0A%09%09agent.setId(2);%0A%09%09agent.setName(%22name2%22);%0A%09%09agent.setNscNumber(%22nsc2%22);%0A%09%09agent.setRetiredIndicator(true);%0A%09%09agent.setDescription(%22desc2%22);%0A%09%09agents.add(agent);%0A%09%09request = new MockHttpServletRequest();%0A%09%7D%0A%09%0A%09public void testGetAgentsTable()%7B%0A%09%09EasyMock.expect(agentRepository.getAgentsByNameAndNsc(%22text%22, %22nsc%22, false)).andReturn(agents);%0A%09%09replayMocks();%0A%09%09List%3CAgent%3E returnedAgents = searchStudyAjaxFacade.getAgentsTable(new HashMap(), %22text%22, %22nsc%22, request);%0A%09%09assertEquals(2, returnedAgents.size());%0A%09%09assertNull(returnedAgents.get(0).getDescription());%0A%09%09assertNull(returnedAgents.get(1).getDescription());%0A%09%09verifyMocks();%0A%09%7D%0A%09%0A%7D%0A

Test case improvement for 'Add Expected AE to Agent.'