Bump versions 9.0.4-SNAPSHOT
[controller.git] / opendaylight / md-sal / samples / toaster-provider / src / test / java / org / opendaylight / controller / sample / toaster / provider / OpenDaylightToasterTest.java
index 7ad1e38e2c4a340cb36d6577eb132234f9bf0cb4..86d2e6d19c249dad322f0f8a94d5ecbd2b546264 100644 (file)
@@ -57,7 +57,7 @@ public class OpenDaylightToasterTest extends AbstractConcurrentDataBrokerTest {
         assertNotNull(optional);
         assertTrue("Operational toaster not present", optional.isPresent());
 
-        Toaster toasterData = optional.get();
+        Toaster toasterData = optional.orElseThrow();
 
         assertEquals(Toaster.ToasterStatus.Up, toasterData.getToasterStatus());
         assertEquals(new DisplayString("Opendaylight"), toasterData.getToasterManufacturer());
@@ -78,7 +78,7 @@ public class OpenDaylightToasterTest extends AbstractConcurrentDataBrokerTest {
         // NOTE: In a real test we would want to override the Thread.sleep() to
         // prevent our junit test
         // for sleeping for a second...
-        Future<RpcResult<MakeToastOutput>> makeToast = toaster.makeToast(toastInput);
+        Future<RpcResult<MakeToastOutput>> makeToast = toaster.invoke(toastInput);
 
         RpcResult<MakeToastOutput> rpcResult = makeToast.get();