001    /**
002     * Copyright 2005-2013 The Kuali Foundation
003     *
004     * Licensed under the Educational Community License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     *
008     * http://www.opensource.org/licenses/ecl2.php
009     *
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    package org.kuali.rice.ksb;
017    
018    import javax.xml.namespace.QName;
019    
020    import org.junit.Test;
021    import org.kuali.rice.ksb.api.KsbApiServiceLocator;
022    import org.kuali.rice.ksb.messaging.MessagingTestObject;
023    import org.kuali.rice.ksb.messaging.service.KSBJavaService;
024    import org.kuali.rice.ksb.test.KSBTestCase;
025    
026    //@Ignore
027    public class StartBusTest extends KSBTestCase {
028    
029            @Override
030            public boolean startClient1() {
031                    return true;
032            }
033    
034            @Test
035            public void testStartTheBus() {
036                    QName serviceName = new QName("TestCl1", "testJavaAsyncService");
037                    
038                    KsbApiServiceLocator.getServiceBus().synchronize();
039                    
040                    KSBJavaService testJavaAsyncService = (KSBJavaService) KsbApiServiceLocator.getMessageHelper().getServiceAsynchronously(serviceName);
041                    testJavaAsyncService.invoke(new MessagingTestObject("message content"));
042                    
043                    // verifyServiceCalls(serviceName);
044            }
045    
046            // @Test public void testStartClient1() throws Exception {
047            // new TestClient1().start();
048            // }
049            //      
050            // @Test public void testStartClient2() throws Exception {
051            // new TestClient1().start();
052            // new TestClient2().start();
053            // }
054            //      
055    }