Migrate users of Optional.get()
[netconf.git] / apps / netconf-topology-singleton / src / test / java / org / opendaylight / netconf / topology / singleton / impl / tx / ProxyReadWriteTransactionTest.java
index f6de1ac5f52c066db1b3ea39181355d48e4baff8..856b188485b6a2dbbb26c0e1d931cf6348430265 100644 (file)
@@ -212,9 +212,7 @@ public class ProxyReadWriteTransactionTest {
         assertEquals(PATH, readRequest.getPath());
 
         masterActor.reply(new NormalizedNodeMessage(PATH, node));
-        final Optional<NormalizedNode> result = read.get(5, TimeUnit.SECONDS);
-        assertTrue(result.isPresent());
-        assertEquals(node, result.get());
+        assertEquals(Optional.of(node), read.get(5, TimeUnit.SECONDS));
     }
 
     @Test