BUG-2637: migrate features
[controller.git] / opendaylight / md-sal / samples / toaster-it / src / test / java / org / opendaylight / controller / sample / toaster / it / ToasterTest.java
index 907b35475f80f3565e18d2965885ff505bb55d6e..93b398f5b14ca807435622d74bd94ebb38175338 100644 (file)
@@ -31,7 +31,6 @@ import static org.junit.Assert.assertEquals;
 import static org.opendaylight.controller.test.sal.binding.it.TestHelper.baseModelBundles;
 import static org.opendaylight.controller.test.sal.binding.it.TestHelper.bindingAwareSalBundles;
 import static org.opendaylight.controller.test.sal.binding.it.TestHelper.configMinumumBundles;
-import static org.opendaylight.controller.test.sal.binding.it.TestHelper.flowCapableModelBundles;
 import static org.opendaylight.controller.test.sal.binding.it.TestHelper.junitAndMockitoBundles;
 import static org.opendaylight.controller.test.sal.binding.it.TestHelper.mdSalCoreBundles;
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
@@ -67,7 +66,6 @@ public class ToasterTest {
                 configMinumumBundles(),
                 // BASE Models
                 baseModelBundles(),
-                flowCapableModelBundles(),
 
                 // Set fail if unresolved bundle present
                 systemProperty("pax.exam.osgi.unresolved.fail").value("true"),
@@ -93,13 +91,13 @@ public class ToasterTest {
         long toastsMade = (long) platformMBeanServer.getAttribute(providerOn, "ToastsMade");
         assertEquals(0, toastsMade);
 
-        boolean toasts = true;
+        boolean success = true;
 
         // Make toasts using OSGi service
-        toasts &= kitchenService.makeBreakfast( EggsType.SCRAMBLED, HashBrown.class, 4);
-        toasts &= kitchenService.makeBreakfast( EggsType.POACHED, WhiteBread.class, 8 );
+        success &= kitchenService.makeBreakfast( EggsType.SCRAMBLED, HashBrown.class, 4).get().isSuccessful();
+        success &= kitchenService.makeBreakfast( EggsType.POACHED, WhiteBread.class, 8 ).get().isSuccessful();
 
-        Assert.assertTrue("Not all toasts done by " + kitchenService, toasts);
+        Assert.assertTrue("Not all breakfasts succeeded", success);
 
         // Verify toasts made count on provider via JMX/config-subsystem
         toastsMade = (long) platformMBeanServer.getAttribute(providerOn, "ToastsMade");