Decompose RPC implementation classes
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / services / sal / UpdateTableImplTest.java
similarity index 94%
rename from openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/sal/SalTableServiceImplTest.java
rename to openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/sal/UpdateTableImplTest.java
index 95e96ac22a08ab6f31dae0a598d4855c4d6685a0..fadf8be174efef4a53cd25107162479b29a9b004 100644 (file)
@@ -42,13 +42,12 @@ import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 import org.opendaylight.yangtools.yang.common.Uint32;
 import org.opendaylight.yangtools.yang.common.Uint8;
 
-public class SalTableServiceImplTest extends ServiceMocking {
-
+public class UpdateTableImplTest extends ServiceMocking {
     @Mock
     RpcProviderService mockedRpcProviderRegistry;
 
     private SettableFuture<Object> handleResultFuture;
-    private SalTableServiceImpl salTableService;
+    private UpdateTableImpl salTableService;
 
     @Override
     public void setup() {
@@ -61,7 +60,7 @@ public class SalTableServiceImplTest extends ServiceMocking {
         }).when(mockedOutboundQueue).commitEntry(any(Uint32.class), any(), any());
 
         final ConvertorManager convertorManager = ConvertorManagerFactory.createDefaultManager();
-        salTableService = new SalTableServiceImpl(mockedRequestContextStack, mockedDeviceContext,
+        salTableService = new UpdateTableImpl(mockedRequestContextStack, mockedDeviceContext,
                 convertorManager, MultipartWriterProviderFactory.createDefaultProvider(mockedDeviceContext));
     }
 
@@ -74,7 +73,7 @@ public class SalTableServiceImplTest extends ServiceMocking {
             return null;
         }).when(multiMessageCollector).endCollecting(any());
 
-        final Future<RpcResult<UpdateTableOutput>> rpcResultFuture = salTableService.updateTable(prepareUpdateTable());
+        final Future<RpcResult<UpdateTableOutput>> rpcResultFuture = salTableService.invoke(prepareUpdateTable());
         Assert.assertNotNull(rpcResultFuture);
         verify(mockedRequestContextStack).createRequestContext();
     }
@@ -89,7 +88,7 @@ public class SalTableServiceImplTest extends ServiceMocking {
             return null;
         }).when(multiMessageCollector).endCollecting(any());
 
-        final Future<RpcResult<UpdateTableOutput>> rpcResultFuture = salTableService.updateTable(prepareUpdateTable());
+        final Future<RpcResult<UpdateTableOutput>> rpcResultFuture = salTableService.invoke(prepareUpdateTable());
         Assert.assertNotNull(rpcResultFuture);
         verify(mockedRequestContextStack).createRequestContext();
     }
@@ -117,7 +116,7 @@ public class SalTableServiceImplTest extends ServiceMocking {
             return null;
         }).when(multiMessageCollector).endCollecting(any());
 
-        final Future<RpcResult<UpdateTableOutput>> rpcResultFuture = salTableService.updateTable(prepareUpdateTable());
+        final Future<RpcResult<UpdateTableOutput>> rpcResultFuture = salTableService.invoke(prepareUpdateTable());
         Assert.assertNotNull(rpcResultFuture);
         verify(mockedRequestContextStack).createRequestContext();
     }