1
2
3
4
5
6
7
8
9
10
11 package org.mule.transport.ejb;
12
13 import org.mule.api.transport.Connector;
14 import org.mule.transport.AbstractConnectorTestCase;
15
16 import org.junit.Test;
17
18 import static org.junit.Assert.assertEquals;
19 import static org.junit.Assert.assertNotNull;
20
21 public class EjbConnectorTestCase extends AbstractConnectorTestCase
22 {
23
24 public Connector createConnector() throws Exception
25 {
26 EjbConnector c = new EjbConnector(muleContext);
27 c.setName("EjbConnector");
28 c.setSecurityManager(null);
29 return c;
30 }
31
32 public String getTestEndpointURI()
33 {
34 return "ejb://localhost:1099";
35 }
36
37 public Object getValidMessage() throws Exception
38 {
39 return "Hello".getBytes();
40 }
41
42 @Test
43 public void testProperties() throws Exception
44 {
45 EjbConnector c = (EjbConnector) getConnector();
46
47 String securityPolicy = "rmi.policy";
48 String serverCodebase = "file:///E:/projects/MyTesting/JAVA/rmi/classes/";
49
50 c.setSecurityPolicy(securityPolicy);
51 assertNotNull(c.getSecurityPolicy());
52 c.setServerCodebase(serverCodebase);
53 assertEquals(serverCodebase, c.getServerCodebase());
54 }
55
56 }