@@ -0,0 +1,2742 @@
+/*%0A * Copyright 2008 The Kuali Foundation.%0A * %0A * Licensed under the Educational Community License, Version 1.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A * %0A * http://www.opensource.org/licenses/ecl1.php%0A * %0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.kuali.module.ar.service;%0A%0Aimport static org.kuali.test.fixtures.UserNameFixture.KHUNTLEY;%0A%0Aimport org.kuali.core.service.DocumentService;%0Aimport org.kuali.kfs.context.KualiTestBase;%0Aimport org.kuali.kfs.context.SpringContext;%0Aimport org.kuali.module.ar.bo.CashControlDetail;%0Aimport org.kuali.module.ar.document.CashControlDocument;%0Aimport org.kuali.module.ar.document.PaymentApplicationDocument;%0Aimport org.kuali.test.ConfigureContext;%0A%0Aimport edu.iu.uis.eden.exception.WorkflowException;%0A%0A@ConfigureContext(session = KHUNTLEY)%0Apublic class CashControlDocumentServiceTest extends KualiTestBase %7B%0A    CashControlDocumentService service;%0A    DocumentService documentService;%0A%0A    /**%0A     * @see junit.framework.TestCase#setUp()%0A     */%0A    @Override%0A    public void setUp() throws Exception %7B%0A        super.setUp();%0A%0A        service = SpringContext.getBean(CashControlDocumentService.class);%0A        documentService = SpringContext.getBean(DocumentService.class);%0A    %7D%0A%0A    /**%0A     * @see junit.framework.TestCase#tearDown()%0A     */%0A    @Override%0A    protected void tearDown() throws Exception %7B%0A        service = null;%0A        documentService = null;%0A        super.tearDown();%0A    %7D%0A%0A    /**%0A     * This method test if createAndSavePaymentApplicationDocument creates and saves a payment application document%0A     * %0A     * @throws WorkflowException%0A     */%0A    public void testCreateAndSavePaymentApplicationDocument() throws WorkflowException %7B%0A%0A        CashControlDocument cashControlDocument = new CashControlDocument();%0A        CashControlDetail cashControlDetail = new CashControlDetail();%0A        PaymentApplicationDocument applicationDocument = service.createAndSavePaymentApplicationDocument(cashControlDocument, cashControlDetail);%0A%0A        assertNotNull(applicationDocument);%0A%0A        PaymentApplicationDocument applicationDocument2 = (PaymentApplicationDocument) documentService.getByDocumentHeaderId(applicationDocument.getDocumentNumber());%0A%0A        assertNotNull(applicationDocument2);%0A        assertTrue(applicationDocument2.getDocumentHeader().getWorkflowDocument().stateIsSaved());%0A    %7D%0A%0A%7D%0A

Add JUnit test for CashControlDocumentService