### Question:
JMSConfigFactory { public static JMSConfiguration createFromEndpointInfo(Bus bus, EndpointInfo endpointInfo, EndpointReferenceType target) { JMSEndpoint jmsEndpoint = new JMSEndpoint(endpointInfo, target); return createFromEndpoint(bus, jmsEndpoint); } private  JMSConfigFactory(); static JMSConfiguration createFromEndpointInfo(Bus bus, EndpointInfo endpointInfo,
                                                          EndpointReferenceType target); static JMSConfiguration createFromEndpoint(Bus bus, JMSEndpoint endpoint); static Properties getInitialContextEnv(JMSEndpoint endpoint);  }### Answer:
@Test public void testUsernameAndPassword() throws Exception { EndpointInfo ei = setupServiceInfo("HelloWorldService", "HelloWorldPort"); JMSConfiguration config = JMSConfigFactory.createFromEndpointInfo(bus, ei, null); Assert.assertEquals("User name does not match.", "testUser", config.getUserName()); Assert.assertEquals("Password does not match.", "testPassword", config.getPassword()); }
@Test public void testMessageSelectorIsSet() { EndpointInfo ei = setupServiceInfo("HelloWorldSelectorService", "HelloWorldPort"); JMSConfiguration config = JMSConfigFactory.createFromEndpointInfo(bus, ei, null); Assert.assertEquals("customJMSAttribute=helloWorld", config.getMessageSelector()); }