Bug 5596 Cleaning part 1
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / device / DeviceStateImplTest.java
index 82230c9862722fef02bcc90ca597dccd5cc6e40d..071743ba3e451b30b8c940964edea9ed4b7b713b 100644 (file)
@@ -8,21 +8,13 @@
 
 package org.opendaylight.openflowplugin.impl.device;
 
-import java.util.Arrays;
-import java.util.List;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
-import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FeaturesReply;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesOutputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.features.reply.PhyPort;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.features.reply.PhyPortBuilder;
+import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
 
 /**
  * openflowplugin-impl
@@ -34,32 +26,15 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 public class DeviceStateImplTest {
 
     @Mock
-    private FeaturesReply featuresReply;
-    private DeviceStateImpl deviceState;
+    private DeviceInfo deviceInfo;
 
-    private final short version = 13;
-    private final long portNr = 10L;
-    private final Long portBandwidth = 1024L;
-    private final List<PhyPort> pPort = Arrays.asList(new PhyPortBuilder()
-                    .setPortNo(portNr).setMaxSpeed(portBandwidth).build());
+    private DeviceStateImpl deviceState;
 
     @Before
     public void initialization() {
-        Mockito.when(featuresReply.getVersion()).thenReturn(version);
-        Mockito.when(featuresReply.getPhyPort()).thenReturn(pPort);
         deviceState = new DeviceStateImpl();
     }
 
-    @Test
-    public void testIsValid_initialValue(){
-        Assert.assertFalse(deviceState.isValid());
-    }
-
-    @Test
-    public void testDeviceSynchronized_initialValue(){
-        Assert.assertFalse(deviceState.deviceSynchronized());
-    }
-
     @Test
     public void testStatPollEnabled_initialValue(){
         Assert.assertFalse(deviceState.isStatisticsPollingEnabled());