Teach sal-remoterpc-connector to route actions
[controller.git] / opendaylight / md-sal / sal-remoterpc-connector / src / test / java / org / opendaylight / controller / remote / rpc / RpcErrorsExceptionTest.java
index 941ae2b..6ced096 100644 (file)
@@ -7,9 +7,10 @@
  */
 package org.opendaylight.controller.remote.rpc;
 
+import static org.junit.Assert.assertEquals;
+
 import java.util.ArrayList;
 import java.util.List;
-import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.yangtools.yang.common.RpcError;
@@ -37,22 +38,25 @@ public class RpcErrorsExceptionTest {
 
     @Test
     public void testGetMessage() {
-        Assert.assertEquals(ERROR_MESSAGE, exception.getMessage());
+        assertEquals(ERROR_MESSAGE, exception.getMessage());
     }
 
     @Test
     public void testGetRpcErrors() {
         final List<RpcError> actualErrors = (List<RpcError>) exception.getRpcErrors();
-        Assert.assertEquals(rpcErrors.size(), actualErrors.size());
+        assertEquals(rpcErrors.size(), actualErrors.size());
 
         for (int i = 0; i < actualErrors.size(); i++) {
-            Assert.assertEquals(rpcErrors.get(i).getApplicationTag(), actualErrors.get(i).getApplicationTag());
-            Assert.assertEquals(rpcErrors.get(i).getSeverity(), actualErrors.get(i).getSeverity());
-            Assert.assertEquals(rpcErrors.get(i).getMessage(), actualErrors.get(i).getMessage());
-            Assert.assertEquals(rpcErrors.get(i).getErrorType(), actualErrors.get(i).getErrorType());
-            Assert.assertEquals(rpcErrors.get(i).getCause(), actualErrors.get(i).getCause());
-            Assert.assertEquals(rpcErrors.get(i).getInfo(), actualErrors.get(i).getInfo());
-            Assert.assertEquals(rpcErrors.get(i).getTag(), actualErrors.get(i).getTag());
+            final RpcError expected = rpcErrors.get(i);
+            final RpcError actual = actualErrors.get(i);
+
+            assertEquals(expected.getApplicationTag(), actual.getApplicationTag());
+            assertEquals(expected.getSeverity(), actual.getSeverity());
+            assertEquals(expected.getMessage(), actual.getMessage());
+            assertEquals(expected.getErrorType(), actual.getErrorType());
+            assertEquals(expected.getCause(), actual.getCause());
+            assertEquals(expected.getInfo(), actual.getInfo());
+            assertEquals(expected.getTag(), actual.getTag());
         }
     }
-}
\ No newline at end of file
+}

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.