Add dsa i18n
[holmes/common.git] / holmes-actions / src / test / java / org / openo / holmes / common / producer / MQProducerTest.java
index 58ea684..1390b77 100644 (file)
@@ -66,6 +66,22 @@ public class MQProducerTest {
         PowerMock.resetAll();
     }
 
+    @Test
+    public void init() {
+        MQConfig mqConfig = new MQConfig();
+        mqConfig.brokerIp = "127.0.0.1";
+        mqConfig.brokerPort = 61616;
+        mqConfig.brokerPassword = "admin";
+        mqConfig.brokerUsername = "admin";
+        expect(mqConfigProvider.get()).andReturn(mqConfig).anyTimes();
+
+        PowerMock.replayAll();
+
+        mqProducer.init();
+
+        PowerMock.verifyAll();
+    }
+
     @Test
     public void sendAlarmMQTopicMsg() throws Exception {
         Alarm alarm = new Alarm();