Merge changes I9865d0cd,Ic71d525f,Ib8faba91,Ia10e5ec9,I35591747,If456a131,I9f8709cc
[controller.git] / opendaylight / netconf / netconf-impl / src / test / java / org / opendaylight / controller / netconf / impl / NetconfMonitoringServiceImplTest.java
index 1b078be9a44863031bab7c631bf3adda53180b5d..21250357994644a7bafa0940acc880a802c43a0f 100644 (file)
@@ -12,7 +12,6 @@ import com.google.common.base.Optional;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 import io.netty.channel.Channel;
-import java.util.List;
 import java.util.Set;
 import org.junit.Before;
 import org.junit.Test;
@@ -56,7 +55,6 @@ public class NetconfMonitoringServiceImplTest {
     public void testSessions() throws Exception {
         doReturn("sessToStr").when(managementSession).toString();
         service.onSessionUp(managementSession);
-        List list = Lists.newArrayList(managementSession);
     }
 
     @Test(expected = RuntimeException.class)
@@ -75,17 +73,17 @@ public class NetconfMonitoringServiceImplTest {
     public void testGetSchemas3() throws Exception {
         doReturn("").when(managementSession).toString();
         Capability cap = mock(Capability.class);
-        Set caps = Sets.newHashSet(cap);
-        Set services = Sets.newHashSet(operationService);
+        Set<Capability> caps = Sets.newHashSet(cap);
+        Set<NetconfOperationService> services = Sets.newHashSet(operationService);
         doReturn(snapshot).when(operationProvider).openSnapshot(anyString());
         doReturn(services).when(snapshot).getServices();
         doReturn(caps).when(operationService).getCapabilities();
-        Optional opt = mock(Optional.class);
+        Optional<String> opt = mock(Optional.class);
         doReturn(opt).when(cap).getCapabilitySchema();
         doReturn(true).when(opt).isPresent();
         doReturn(opt).when(cap).getModuleNamespace();
         doReturn("namespace").when(opt).get();
-        Optional optRev = Optional.of("rev");
+        Optional<String> optRev = Optional.of("rev");
         doReturn(optRev).when(cap).getRevision();
         doReturn(Optional.of("modName")).when(cap).getModuleName();
         doReturn(Optional.of(Lists.newArrayList("loc"))).when(cap).getLocation();