### Question:
XMPPBridgeFactory implements EventBridgeFactory { @Override public EventBridge createEventBridge( Collection<EventSubject> localSubjects, String externalSubject, Map<String, String> properties) { return new XMPPBridge(localSubjects, externalSubject, properties); }  @Override EventBridge createEventBridge(
            Collection<EventSubject> localSubjects,
            String externalSubject,
            Map<String, String> properties);  }### Answer:
@Test public void testCreateEventBridge() { EventBridge bridge = new XMPPBridgeFactory().createEventBridge( subjects, externalSubject, Collections.<String, String>emptyMap()); assertTrue(bridge instanceof XMPPBridge); assertEquals(subjects, bridge.getLocalSubjects()); assertEquals(externalSubject, bridge.getExternalSubject()); }
@Test public void testUseMapPropertiesSetter() throws Exception { XMPPBridgeFactory bridgeFactory = new XMPPBridgeFactory(); Map<String, String> properties = new HashMap<>(); properties.put(XMPPBridge.XMPP_HOST_PROPERTY, XMPPBridgeProviderTest.HOST_TEST); properties.put(XMPPBridge.XMPP_CHAT_SERVICE_PROPERTY, XMPPBridgeProviderTest.CHAT_SERVICE_TEST); properties.put(XMPPBridge.XMPP_LOGIN_PROPERTY, XMPPBridgeProviderTest.LOGIN_TEST); properties.put(XMPPBridge.XMPP_PASSWORD_PROPERTY, XMPPBridgeProviderTest.PASSWORD_TEST); properties.put(XMPPBridge.XMPP_SECURE_CONNECTION_PROPERTY, String.valueOf(XMPPBridgeProviderTest.SECURE_CONNECTION_TEST)); properties.put(XMPPBridge.XMPP_PORT_PROPERTY, String.valueOf(XMPPBridgeProviderTest.PORT_TEST)); XMPPBridge bridge = (XMPPBridge) bridgeFactory.createEventBridge(subjects, externalSubject, properties); assertEquals(bridge.getXmppHost(), XMPPBridgeProviderTest.HOST_TEST); assertEquals(bridge.getChatService(), XMPPBridgeProviderTest.CHAT_SERVICE_TEST); assertEquals(bridge.getLoginId(), XMPPBridgeProviderTest.LOGIN_TEST); assertEquals(bridge.getPassword(), XMPPBridgeProviderTest.PASSWORD_TEST); assertEquals(bridge.getXmppPort(), XMPPBridgeProviderTest.PORT_TEST); assertEquals(bridge.isSecureConnection(), XMPPBridgeProviderTest.SECURE_CONNECTION_TEST); }