Migrate users of Optional.get()
[controller.git] / opendaylight / md-sal / sal-remoterpc-connector / src / test / java / org / opendaylight / controller / remote / rpc / registry / RpcRegistryTest.java
index 563bde4b143fc9ad679bcb221d5f449b0b08b522..18b2f9f6e0769383b4c32a8d46c4b364129585f5 100644 (file)
@@ -304,7 +304,7 @@ public class RpcRegistryTest {
         assertNotNull(maybeEndpoint);
         assertTrue(maybeEndpoint.isPresent());
 
-        final RemoteRpcEndpoint endpoint = maybeEndpoint.get();
+        final RemoteRpcEndpoint endpoint = maybeEndpoint.orElseThrow();
         final ActorRef router = endpoint.getRouter();
         assertNotNull(router);