+ @Test
+ public void testNegativePerformingWriteOperationOnReadTransaction() throws Exception {
+ try {
+
+ final ActorRef shard = getSystem().actorOf(Shard.props("config", Collections.EMPTY_MAP));
+ final Props props =
+ ShardTransaction.props(store.newReadOnlyTransaction(), shard, TestModel.createTestContext());
+ final TestActorRef subject = TestActorRef.apply(props,getSystem());
+
+ subject.receive(new DeleteData(TestModel.TEST_PATH).toSerializable(), ActorRef.noSender());
+ Assert.assertFalse(true);
+
+
+ } catch (Exception cs) {
+ assertEquals(cs.getClass().getSimpleName(), Exception.class.getSimpleName());
+ assertTrue(cs.getMessage().startsWith("ShardTransaction:handleRecieve received an unknown message"));
+ }
+ }