### Question:
JMSBridgeFactory implements EventBridgeFactory { public EventBridge createEventBridge(Collection<EventSubject> localSubjects, String externalSubject, Map<String, String> properties) { return new JMSBridge(localSubjects, externalSubject, properties); }  EventBridge createEventBridge(Collection<EventSubject> localSubjects, String externalSubject, Map<String, String> properties);  }### Answer:
@Test public void testCreateEventBridge() throws Exception { EventBridge bridge = new JMSBridgeFactory().createEventBridge( subjects, externalSubject, Collections.<String, String>emptyMap()); assertNotNull(bridge); assertTrue(bridge instanceof JMSBridge); assertEquals(subjects, bridge.getLocalSubjects()); assertEquals(externalSubject, bridge.getExternalSubject()); }
@Test public void testUseProperties() throws Exception { JMSBridgeFactory bridgeFactory = new JMSBridgeFactory(); Map<String, String> properties = new HashMap<>(); properties.put(JMSBridge.TOPIC_CONNECTION_FACTORY_PROPERTY, JMSBridgeProviderTest.TOPIC_CONNECTION_FACTORY_TEST); JMSBridge bridge = (JMSBridge) bridgeFactory.createEventBridge( subjects, externalSubject, properties); assertEquals(bridge.getTopicConnectionFactoryName(), JMSBridgeProviderTest.TOPIC_CONNECTION_FACTORY_TEST); }
@Test public void testUseDefaultProperties() throws Exception { JMSBridgeFactory bridgeFactory = new JMSBridgeFactory(); JMSBridge bridge = (JMSBridge) bridgeFactory.createEventBridge( subjects, externalSubject, Collections.<String, String>emptyMap()); assertEquals(bridge.getTopicConnectionFactoryName(), JMSBridge.TOPIC_CONNECTION_FACTORY_DEFAULT); }