Changed RegisterChangeListener and RegisterChangeListenerReply
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / test / java / org / opendaylight / controller / cluster / datastore / ShardTest.java
index ed447e004fd9b91a7ad7da1561fdb83bf3cbb2d7..d1eabb0eea8ddd15482fa180fb9158994d2aed4b 100644 (file)
@@ -7,7 +7,7 @@ import org.junit.Test;
 import org.opendaylight.controller.cluster.datastore.messages.CreateTransaction;
 import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionChain;
 import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionChainReply;
-import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionReply;
+import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply;
 import org.opendaylight.controller.cluster.datastore.messages.RegisterChangeListener;
 import org.opendaylight.controller.cluster.datastore.messages.RegisterChangeListenerReply;
 import org.opendaylight.controller.cluster.datastore.messages.UpdateSchemaContext;
@@ -75,15 +75,15 @@ public class ShardTest extends AbstractActorTest {
                         getRef());
 
                     subject.tell(new RegisterChangeListener(TestModel.TEST_PATH,
-                        getRef().path(), AsyncDataBroker.DataChangeScope.BASE),
+                        getRef().path(), AsyncDataBroker.DataChangeScope.BASE).toSerializable(),
                         getRef());
 
                     final String out = new ExpectMsg<String>("match hint") {
                         // do not put code outside this method, will run afterwards
                         protected String match(Object in) {
-                            if (in instanceof RegisterChangeListenerReply) {
+                            if (in.getClass().equals(RegisterChangeListenerReply.SERIALIZABLE_CLASS)) {
                                 RegisterChangeListenerReply reply =
-                                    (RegisterChangeListenerReply) in;
+                                    RegisterChangeListenerReply.fromSerializable(getSystem(),in);
                                 return reply.getListenerRegistrationPath()
                                     .toString();
                             } else {
@@ -126,7 +126,7 @@ public class ShardTest extends AbstractActorTest {
                             if (in instanceof CreateTransactionReply) {
                                 CreateTransactionReply reply =
                                     (CreateTransactionReply) in;
-                                return reply.getTransactionPath()
+                                return reply.getTransactionActorPath()
                                     .toString();
                             } else {
                                 throw noMatch();