+
+ @Test
+ public void testOnReceivePreBoronReadData() throws Exception {
+ new JavaTestKit(getSystem()) {{
+ ActorRef transaction = newTransactionActor(RO, readOnlyTransaction(), createShard(),
+ "testOnReceivePreBoronReadData");
+
+ transaction.tell(new ReadData(YangInstanceIdentifier.EMPTY, DataStoreVersions.LITHIUM_VERSION).
+ toSerializable(), getRef());
+
+ Object replySerialized = expectMsgClass(duration("5 seconds"), ReadDataReply.class);
+ assertNotNull(ReadDataReply.fromSerializable(replySerialized).getNormalizedNode());
+ }};
+ }
+
+ @Test
+ public void testOnReceivePreBoronDataExists() throws Exception {
+ new JavaTestKit(getSystem()) {{
+ ActorRef transaction = newTransactionActor(RO, readOnlyTransaction(), createShard(),
+ "testOnReceivePreBoronDataExists");
+
+ transaction.tell(new DataExists(YangInstanceIdentifier.EMPTY, DataStoreVersions.LITHIUM_VERSION).
+ toSerializable(), getRef());
+
+ Object replySerialized = expectMsgClass(duration("5 seconds"),
+ ShardTransactionMessages.DataExistsReply.class);
+ assertTrue(DataExistsReply.fromSerializable(replySerialized).exists());
+ }};
+ }
+
+ public static class TestException extends RuntimeException {
+ private static final long serialVersionUID = 1L;
+ }