import org.opendaylight.controller.cluster.datastore.modification.WriteModification;
import org.opendaylight.controller.md.cluster.datastore.model.TestModel;
import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore;
-import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
protected void run() {
subject.tell(
- new ReadData(InstanceIdentifier.builder().build()).toSerializable(),
+ new ReadData(YangInstanceIdentifier.builder().build()).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.getClass().equals(ReadDataReply.SERIALIZABLE_CLASS)) {
- if (ReadDataReply.fromSerializable(testSchemaContext,InstanceIdentifier.builder().build(), in)
+ if (ReadDataReply.fromSerializable(testSchemaContext,YangInstanceIdentifier.builder().build(), in)
.getNormalizedNode()!= null) {
return "match";
}
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 WriteDataReply) {
+ if (in.getClass().equals(WriteDataReply.SERIALIZABLE_CLASS)) {
return "match";
} else {
throw noMatch();
final String out = new ExpectMsg<String>(duration("500 milliseconds"), "match hint") {
// do not put code outside this method, will run afterwards
protected String match(Object in) {
- if (in instanceof MergeDataReply) {
+ if (in.getClass().equals(MergeDataReply.SERIALIZABLE_CLASS)) {
return "match";
} else {
throw noMatch();
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 DeleteDataReply) {
+ if (in.getClass().equals(DeleteDataReply.SERIALIZABLE_CLASS)) {
return "match";
} else {
throw noMatch();
new Within(duration("1 seconds")) {
protected void run() {
- subject.tell(new ReadyTransaction(), getRef());
+ subject.tell(new ReadyTransaction().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 ReadyTransactionReply) {
+ if (in.getClass().equals(ReadyTransactionReply.SERIALIZABLE_CLASS)) {
return "match";
} else {
throw noMatch();
new Within(duration("2 seconds")) {
protected void run() {
- subject.tell(new CloseTransaction(), getRef());
+ subject.tell(new CloseTransaction().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 CloseTransactionReply) {
+ if (in.getClass().equals(CloseTransactionReply.SERIALIZABLE_CLASS)) {
return "match";
} else {
throw noMatch();