Fix star import and enable checkstyle rule to prevent it.
[controller.git] / opendaylight / config / yang-jmx-generator / src / test / java / org / opendaylight / controller / config / yangjmxgenerator / RuntimeBeanEntryTest.java
index 597cf4ccc9d1cf033cb6ae919662c69ec89008f0..97258fb697cbc25211a63645a8f454437b59f29c 100644 (file)
@@ -7,20 +7,6 @@
  */
 package org.opendaylight.controller.config.yangjmxgenerator;
 
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThat;
-import static org.mockito.Mockito.doReturn;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-
-import javax.management.openmbean.SimpleType;
-
 import org.junit.Test;
 import org.mockito.Mockito;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.JavaAttribute;
@@ -30,6 +16,20 @@ import org.opendaylight.yangtools.yang.model.api.ChoiceCaseNode;
 import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
 
+import javax.management.openmbean.SimpleType;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+
+import static junit.framework.Assert.assertNotNull;
+import static junit.framework.Assert.assertNull;
+import static org.hamcrest.CoreMatchers.is;
+
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.doReturn;
+
 public class RuntimeBeanEntryTest extends AbstractYangTest {
 
     public static final String PACKAGE_NAME = "packages.sis";
@@ -111,7 +111,8 @@ public class RuntimeBeanEntryTest extends AbstractYangTest {
         RuntimeBeanEntry.Rpc rpc = getRpcByName(rpcs, SLEEP_RPC_NAME);
         assertNotNull(rpc);
         assertThat(rpc.getYangName(), is(SLEEP_RPC_NAME));
-        assertThat(rpc.getReturnType().endsWith(SLEEP_RPC_OUTPUT), is(true));
+
+        assertThat(((JavaAttribute)rpc.getReturnType()).getType().getFullyQualifiedName().endsWith(SLEEP_RPC_OUTPUT),  is(true));
 
         // get sleep rpc input attribute and test it
         List<JavaAttribute> attributes = rpc.getParameters();